It's from the Hitchhiker's guide to the Galaxy and is what the Dolphins say as they leap out of the water to escape from Earth.
From the movie version:
In the film's opening, the Hitchhiker's Guide to the Galaxy (Stephen Fry) narrates that the dolphins, the second most-intelligent creatures on Earth, had attempted to warn mankind about the planet's impending destruction, but humans had interpreted the dolphins' communications as tricks. The dolphins considered their mission a failure and left the planet, leaving their final message to humans as "So long, and thanks for all the fish."