Playing the Lottery
You can enter the lottery by heading to the main desk of the Radio Tower in Goldenrod City. Every morning, a new number will be drawn. It will then compare the drawn number to the trainer ID numbers of your Pokemon. If you have any Pokemon whose Trainer number matches the number drawn that day, you will win a prize. The more digits that match, the better the prize.
Small Prizes
In "HeartGold" and "SoulSilver" you can win TMs as lesser prizes at the Lottery. TM02, Dragon Claw, is a dragon-typed physical move. TM42, Facade, is a Normal physical move that does twice as much damage if the user is burned, poisoned or paralyzed. TM57, Charge Beam, is an Electric-type special move that has a high chance of raising the user's special attack. TM60, Drain Punch, is a Fighting-type physical move that heals the user for half the damage inflicted. TM62, Silver Wind, is a Bug-type special move that has a chance of raising all the user's stats. TM65, Shadow Claw, is a Ghost-type physical move that has a high critical hit rate. TM91, Flash Cannon, is a Steel type special move that damages the opponent and has a chance of lowering its Special Defense.
Grand Prize
The grand prize of the Goldenrod Lottery is a Master Ball, a Pokeball that can catch any Pokemon. To get the Master Ball, you must have a Pokemon whose ID number matches all numbers of the lotto ticket. Though this makes getting a Master Ball much more difficult in "Soul Silver" than other games, you can potentially get more than one Master Ball per game.
Tips on Winning
The surefire way to game the lottery in "Pokemon Soul Silver" is to trade with a lot of different people. All Pokemon caught by one Pokemon trainer will have the same ID number, so you have a low chance of winning if you never trade. Using the Global Trade System and requesting mediocre or common Pokemon will give you lots of potential trades with different partners, increasing your chances to win the lottery.