This answer really depends on the age of the child. Essentially, as a parent you want to ensure that your child's friends are not encouraging destructive or anti-social behaviour but also that your child does not become involved in unhealthy friendships that can include bullying, manipulation, exploitation or emotional abuse.
Appropriately supervised younger children (i.e. toddlers and preschoolers) won't be able to get into undo trouble together and because of their level of development, and how they interact, the impact of friends is much more minimal. For this age group, therefore, knowing the friends' parents is often more important than actually knowing the child. As such, you want to meet the friend's parents before sending them to play at a new playmate's house. Be sure you are comfortable with the level of supervision that will be maintained and don't be afraid to ask about any concerns you may have regarding pets, activities, food being served etc...
For school-aged children, it's a good idea to engage with the new friends, encourage your child to invite them over to you house and use the opportunity to chat with them and get to know them yourself. You don't want to interrogate or intimidate them but asking some gentle questions about themselves, what they like, what they think of school etc... can give you the chance to 'get a feel' for the individual child. By having the children play together at your house you can also observe their interaction and get some idea of both the other child as well as the nature of the friendship (i.e. power balances, potential bullying etc..).
For older children and teens, this issue can be particularly tricky. You want to show your child that you trust them but at the same time, you want to be aware of what they are doing and who they are spending time with. At this age children are exploring independence and struggling to find their own identity away from the family unit. This can be a trying time for parents as it can feel like a child is pulling away and the parent has to get used to playing a less pivotal role in the child's life. Your level of involvement in your teen's friendships depends on their age, level of social development and history of friendships. You need to know your child and what help they might need from you but at the same time make sure to remember that as they get older, it's natural for you to have less and less contact with their friends. That being said, it's still important to keep your eyes open and do what you can to make sure your child is happy and safe. Again, having friends over, encouraging your children to invite friends to dinner or to hang out at your house gives you, the parent, the opportunity to get to know the friends and observe their interaction with your child. Step carefully, however, as pushing too hard to get to know friends or in appropriately intruding in your child's life will only result in alienating your child and creating barriers between you which will in turn cause you to be even less aware of what is really going on.
At any age, the best defence against negative experiences with friends is to develop a strong bond of trust and open communication between you and your own child so that they will feel comfortable coming to you if they find themselves involved with a peer who is a negative influence or with whom they've established an unhealthy relationship. Basically, you can never know exactly what goes on when you're not around and you'll probably never get to know each and every one of you child's friends in a close manner but if you're able to have trust in your own child's abilities, values and self-esteem, you won't have to worry about the undo influence of peers. It is also important for you to be in touch with your child and how they are feeling about things in general. If you develop an attached and trusting relationship with open channels of communication, you'll not only be more likely to notice when something is bothering your child but will also be able to discuss the problem with them whether it's an issue with a friend or something else.