Go to the only open door and pick a star. Then, go to the flowers in a circle then get the coins and the life. Also, go down to where you have to open the gate and get that life. And last get 50 coins on any level to also get a life. (repeat above) Max # of lifes is 100.
(supplied by: zach)
You need all 120 stars to do this. After you get all 120 stars go outside of the castle near the little pond. There should be a cannon there. Aim right above the castle. When you are on top of the castle you should see about four lifes, a flying hat to get down safely and Yoshi. Talk to Yoshi and he'll talk about him waiting for you and stuff like that than he'll start giving you lives, it will stop at 100.
(supplied by: michael lee)