In Banjo-Kazooie and Banjo-Tooie it is possible to walk under water. Both games determine if you are under water or not when you make contact with the surface, however if you don't then the game will still assume you're on land.
Using a Gameshark or cheats in an Emulator if the water is near a wall then you can simply levitate over the wall and then land back under the water. However it is possible to do it without cheats.
In Banjo-Tooie in Jolly Rogers Lagoon go to Smuggler's Cavern and swim to the right piece of wall, you'll notice that you will fall into the water. Note: If you enter another area under the water you will start swimming.