Our kids makemade it very obvious they wanted their own beds. The first at 3, thenthe second before 18 months.
They got to the point of being fidgety and grumpy when in our bed, often kicking away to get their own space, and seeming irritated to be with us.
We made a point to get them beds, letting them pick bedding, and praising attention around the bed.
There was then a gradual process to wean them into it - putting them down in their bed at night when tired, but not asleep. They have to learn to actually fall asleep in the bed. Breast-feeding, or otherwise just cuddling in the bed really helps them. It maintains the way they're used to falling asleep.
Once they're asleep in the bed you can leave them all night.
The bedtime can be cut back slowly from lying with them to sitting with them to standing. Rather than cutting them off, it's best to reassure that you're always there and close. If they know you're available there is no need to cry out.
At the moment our 2 year old-year-old will actually get herself into bed. If she's put into bed she just says good night, rolls over and goes to sleep.
Basically, it comes down to removing the stress for the child, and making it a pleasant experience, with as much routine as possible. A bath with calm bubbles (lavender works wonders), warm milk, hugs, and tucking into bed with a story. Get a routine, same time, same habits, and then it sticks easily.