Where to buy it
Go to Mistralton City and visit the Pokémart. TM Sunny Day (TM11) costs 50,000 Pokédollars.
Other weather TMs
The same shop sells the other weather TMs, also for 50,000 each:
- TM07: Hail
- TM18: Rain Dance
- TM37: Sandstorm
It is an expensive purchase, so save your money first. Once you have it, teach it to Whimsicott from your bag.