The intro to WW tells first of OoT. When Link gets sent back in time, he shatters the Triforce. When he's living his childhood seven years earlier, Ganondorf comes back. The people of Hyrule prayed for Link to return, but he didn't/couldn't. So the 3 godesses flooded Hyrule to stop Ganondorf...