Our daughter bedshared with us until she was a little over 3, so I have no advice for a younger toddler or baby as for us, it was just better and easier and we got more sleep bedsharing at that age. But for our 3 year old, I had an idea of when we would like her to start moving to her bed as I was getting ready to start a new job (which would involve a very early commute) and also we want to have another baby, so we started to talk about her sleeping in her own room. She had long since gone to bed in her room, but she would come in to us when she wanted to during the night and then stay with us til the morning. So we started to talk about it and her sleeping all night there and I talked about getting her a gro clock, and she was really excited about the idea of having a clock that would tell her when it was morning so she could come and wake us up. So we got the gro clock and talked about it and explained how it would work and basically just got her excited to do it. By 3, I think she was ready to understand this. It wouldn't have worked for her when she was younger.
Then one day she just announced that she was ready to sleep all night in her room (because we'd been talking about it), so we set the clock and just did it. She did wake up once or even a few times a night for maybe the first 2 weeks, but we gently took her back to bed, explained that she needed to wait until the sun came up to come into our room, and helped her go back to sleep. And that was it, after about 2 weeks, she just slept through the night all night in her room. She does occasionally wake up and come in to us, but we take her back to her room and give her a cuddle and then she gets back into bed and goes to sleep. That worked for us, but I really think it was because she was just ready, so we didn't have to try to hard.