The module Mike linked to is a Craycraft unit based on Nick Burges design. It uses an air compressor rigged as a vacuum pump to suck air out of the cylinder and is stored in the front section at about 6-7psi. The tank can fill to about 90% because there are probes inside that sense the water level, so the pump doesn't ingest water. To surface a servo controlled air valve releases the compressed air back into the ballast tank, and up you come.
These modules cost over £400 twenty years ago, so they weren't cheap by any means. The compressor was a bespoke item, which ratcheted up the cost. The system works well enough, and is quite efficient as you're only moving air about.
One or two minuses, firstly if you like to dive deep, you should be aware that with the bottom of the tank exposed to water pressure, the air bubble in the top of the tank will compress and gradually the boat will get heavier and lose its trim. This tends to only be an issue if you go beyond three or four feet, but it's worth being aware of.
Secondly if you go beyond 15 feet you can't blow the tank as there is insufficient pressure. This happened to a modeller once who was operating in a pond at Legoland. The pond there goes down to 20 feet apparently, and he ended up needing his boat scraping off the bottom.