I believe you do this by completing your Pokedex and achieving other tasks in the game. I have Pokemon Fire Red, never used cheats on this game. I did everything as I was supposed to:
Beaten the Elite 4 (twice)-- Finished the Kanto Pokedex-- Enabled trading with Ruby and Sapphire-- I caught my legendary dog Entei--
Meanwhile I have 2 gold stars on my trainer card. I honestly can not say how I earned them because I never noticed them before. Until recently I saw a web page talking about the trainer stars. I noticed I had 2.
I may have gotten them from beating the Elite 4 twice, but I do not know for sure.------
UPDATE: I was quite right, beating the Elite 4 and finishing your pokedex gives you new trainer cards: