My oldest daughter did this at about the same age.
What we did to stop it was buy an fairly inexpensive (about $10) toy that she wanted to use as an incentive for her staying in bed. Then we made a calendar that she could "X" off the days that she stayed in her own bed, and once she got 7 days in a row, she could have the toy. We had hung the toy on the wall above the calendar--just out of her reach.
It was important to have the toy for her to see. We tried doing it by telling her we were going to get it...and I think that was too abstract for her age.
We didn't make a big fuss about it, and were completely non-punative with it. If she came into our bed..."Oh, I guess you needed a snuggle. Well we'll just start over tonight with working on earning your toy." If she stayed in her bed "That's great, you are one day closer to getting your toy." It took her less than 3 weeks to earn it, and by then she was pretty much broken of the habit.
Oh, and we bought an alarm clock for her and covered over the minutes, leaving just the hour exposed. We told her that she could come over to our bed when it got to 7. I think that having some sense of how much longer she needed to stay in bed helped her.