If your child will to go to bed only if you're around, he's forming bad habit that will be hard to break later. The best lesson you can teach him is how to soothe himself to sleep.
Follow a nightly bedtime ritual (bath, books, and bed, for example) so he knows what's expected of him and what to expect at night. You can tell him that if he stays in bed you'll come back in five minutes to check on him. Let him know that he's safe and that you'll be nearby.
Toddlers are great negotiators, and they're no different when it comes to bedtime. And because they so enjoy the time they spend with you, they'll do what they can to prolong the time they have with you. Your child may take his time doing his usual nightly routine, ask repeatedly for a glass of water, or keep requesting that you come to his room because he needs something.
If you suspect he's stalling, don't let him. Tell him it's time for bed and that he can finish working on his art project the next day or find the stuffed bunny the following morning. Make the nighttime routine more “business like” when you kiss your baby and tuck him/her in. Don’t wait around for your baby to fuss. Just leave and close the door and wait about ten minutes before you go back in the room.
Sometimes it’s just a battle for control. Your toddler wants to control his environment as much as possible. You can’t force him to fall asleep. Try reverse psychology and tell him he doesn’t have to go to sleep, but can play in his crib. Eventually, he’ll fall asleep on his own.