Sandstorm is a great TM for your Pokémon to learn as it lasts for multiple turns. This move causes a sandstorm to wreak havoc on the battlefield for five turns. Any Pokémon other than a rock or ground type is damaged every turn the sandstorm rages. This is where you can find this TM in Pokémon Brilliant Diamond and Brilliant Pearl.
Before you can find this TM, you must first defeat the Elite Four and become the champion. Once you've done that, you can go to Snowpoint City and talk to the sailor to get a ride to the combat area. Now that you've completed this step, it's time to finish your Pokédex. To do this, you will need to see all the Pokémon in the Sinnoh region (there are 150 of them).
After completing both of the above activities, you will be allowed to head north of the combat area towards Route 225. Follow the path until you reach Route 228. You will know when you will reach the correct area when you are caught in the middle of a sandstorm. Follow the path south along the left edge and you'll meet an elite trainer. Defeat them and continue south until you meet the pair of Pokémon Ranger. Next to the Pokémon Rangers you will see the TM.