The Goddesses flooded Hyrule to keep the Master Sword and the Triforce of Courage away from Ganondorf.
Guru-Guru played the Song of Storms too much.
Just kidding. After Ganondorf escaped the Sacred Realm in the Adult Timeline and wreaked havoc upon the kingdom, the Golden Goddesses decided to seal away both him and Hyrule. They did this by flooding the kingdom, while instructing the Hylians to flee to the mountaintops.