There's a lot of (very strong!) difference of opinion on this subject. There are people who advocate for always comforting a child who is crying, and there are those who feel that it is okay to leave you children for varying lengths of time before responding.
The former group tend to support the idea that not responding to a crying baby may lead to the baby becoming unnecessarily stressed, with the possible consequences of teaching the infant that their attempts at communication (crying) are ineffective, with potentially far-reaching consequences to the child's development.
The later group tends to support the idea that crying at bed time is a problem caused by the child not being able to self-soothe, and while infants will eventually learn how to self-soothe on their own, there are techniques that may help them learn faster. There are a number of divergent methods on how this is best accomplished, and one of the more popular ideas is the Ferber Method. The basic premise of the Ferber method is to put your baby down for bed while the baby is still awake, and alternate soothing the child (without picking up the child or feeding them) with gradually increasing periods of leaving the child to try and fall asleep.
To quote Dr. Ferber:
"Simply leaving a child in a crib to cry for long periods alone until
he falls sleep, no matter how long it takes, is not an approach I
approve of. On the contrary, many of the approaches I recommend are
designed specifically to avoid unnecessary crying."
It is worth noting that the various cry it out methods are generally targeted for children who have reached a certain age. While I have seen claims that the Ferber method and other similar methods can be used as young as 4 months, most people seem to advocate waiting until at least 6 months.
My wife and I used the Ferber method on our son when he was 6 months old, and within 2 days he was falling asleep on his own without crying. We started by waiting 1 minute before coming in to soothe him, and gradually worked up to 10 minutes in between visits (the first night; we never got past 8 minutes the second night before he simply fell asleep).
Not all children will respond as well as our son did, and some children simply do not respond at all to this method. This is why it is important that you should consider your child's temperament before deciding whether you want to try to teach your child to self-soothe, or continue to respond when they cry and let them learn to self-soothe on their own. I believe either method is viable, depending upon the temperament of the individual child. I think most children will be fine with either system, but some children will likely be strongly predisposed to respond more to one, and far less to the other.
Also to be considered is your own comfort level. If your child crying for 10 minutes at a time causes you undue stress, then you may be better off avoiding the Ferber method and those similar. Remember: you need to be as free from stress as is reasonably possible, too!