My daughter is 3-1/2 and she slept in our room her whole life, either in her crib, or in our bed. It would go in spurts but there was a lot of in our bed, for sure. She's had her own room for the past 8 months but for one reason or another we could never start putting her to bed there. Finally, we stopped making excuses, bought the safety gate for the stairs, bought the hallway nightlight and just made the move. It's been absolutely fine, and she sleeps there all night, almost every night.
Here's what we did:
First, we made a big deal about how she was a big girl now, and she could start sleeping in HER own room, in HER own bed. We bought her a "sleeping buddy", a big pink horse, that now lives on the floor in the play room because he was too big for the bed. We bought a few new cute things for her walls and got her excited about those and about putting them in HER room. Then, I bought a Storytime Theater projector and every story cartridge I could find. Every night, we pick out a story to watch, cuddle in her bed, and watch a story. She usually wants to watch them more than once, and is usually asleep by the time the second run is over. When she falls asleep, I put a big body pillow in the bed next to her, and cover her up. Done. She usually doesn't come get in our bed until around 5am, which is fine. We do the early morning cuddle and we're all up and about by 6am anyway.
Let her be involved in picking out her new routine and then be consistent. If she comes to your bed in the middle of the night, as hard as it is, you have to take her back to her bed, and then get up and leave when she's asleep again.
Good Luck!