Instructions
Make your way to the very top of Temporal Tower to encounter Dialga. After a short cut scene, the battle will begin.
Make sure Munchlax or one of your other Pokemon knows the battle move "Dig." It is a quick move that is especially powerful against Dialga.
Use "Dig" until Dialga attacks you. At the beginning of battle, he moves slowly, so it is best to inflict as much damage as possible.
Use a "Sleep Seed" or "Sleep Powder" to put Dialga to sleep. This will prevent him from attacking you for a few turns.
Use as many healing items as you have whenever Dialga attacks you. This will prolong your life and allow you to defeat him.