In Episode 569 of "One Piece," King Neptune of the Ryugu Kingdom on Fish-Man island explains that the island once came to an agreement with the mysterious Joy Boy more than 800 years prior to the events of the series. This took place during the "Void Century," an era that was completely wiped from history by the World Government — hence all of the mystery surrounding Joy Boy and his exploits.
Neptune explains that Joy Boy promised to raise Fish-Man Island to the surface with the help of a ship called Noah and the monsters known as "Sea Kings" — though he went on to break this promise, possibly due to his involvement with the Ancient Kingdom's war against the 20 Kings. Joy Boy left behind a Poneglyph that contained an apology for his betrayal and another promise that he would return 800 years later to fulfill his oath. This prophecy is expended upon during a flashback in Episode 968 — where we see Gol D. Roger discover the One Piece treasure and learn the true history of the Void Century, before mysteriously claiming that he was too early in his arrival on the island.
This flashback continues into Episode 969, where Kozuki Oden and Roger travel back to Fish-Man Island and hear the monstrous Sea Kings prophesying that the one who would lead them (fulfilling Joy Boy's oath) would come in 25 years alongside the rebirth of Poseidon — a prophecy which seems to line up with Monkey D. Luffy's visit to the island.