His best friend died in the ocean.
Danny tells Steve in "Lana I Ka Moana (Adrift)" (Season 3, Episode 3) that he used to love the ocean, but started hating it after his best friend Billy died. Billy had been swimming toward Danny for help.