Whether you want your kid to sleep alone or with you is totally up to you. But after a particular age, it is good to allow your kids to sleep alone.
Generally, all of a sudden, if you ask your kid to sleep alone, he or she may feel afraid of doing so. When your kids sleep with you, they tend to feel secure and nightmares don't scare them much.
But once they start sleeping alone in a different bedroom, the first fear they face is about the nightmares.
When kids don't have anyone to hug during a nightmare, they tend to get scared. Also, as kids are scared of a dark room, they might face problems falling asleep.
So it is better to gradually train them after a particular age to allow them to sleep alone. Till the age of 6- 7 years, you can allow them to sleep in your bedroom. But gradually, it is better to allow them to sleep independently so that they start growing up and learn to deal with their fears of loneliness.
But the process should be slow and gradual so that they won't feel abandoned all of a sudden. Make the process easy for your kid so that there won't be any fear issues.