Nothing happens.
The only thing that happens is your trainer card changes colour
(The below colors are for HG/SS)
no stars- red
1 star- blue
2 stars-green
3 stars-pink
4 stars-silver
5 stars-black
this is how you get them:
Defeat the Elite Four
Collect 5 Shiny Leaves on one Pokémon and speak to Ethan/Lyra in New Bark Town
Defeat the records on all 10 Pokéathlon events
Get a 100-Streak in the Battle Tower
Complete the National Pokédex. You need to capture all Pokémon other than Mew, Celebi, Jirachi, Deoxys, Phione, Manaphy, Darkrai, Shaymin & Arceus, giving you a total of 484 in your Pokédex.
Also the nurse will start to say other things.
source: http://www.serebii.net/heartgoldsoulsilver/trainercard.shtml
For other colors, check here: http://bulbapedia.bulbagarden.net/wiki/Trainer_stars