One episode of Voyager (Thirty Days) involved the Delta Flyer flying into a water world. They might be able to go underwater, but starships and standard shuttles weren't really designed for it. Starfleet probably has special craft designed for traversing liquid environments, such as the multi-purpose aqua-shuttle from Star Trek: The Animated Series.
I am not sure about true Underwater, but I would figure if a starship could enter a liquid environment in a Gas Giant Planet, actual underwater environments would not be too difficult. Again though, this would no doubt be a rare and not ideal condition, as Starships are designed for space and not underwater, so I would say it would not be the norm for any vessel.
Leela: Depth at 45 hundred feet, 48 hundred, 50 hundred! 5000 feet!
Farnsworth: Dear Lord, that's over 150 atmospheres of pressure.
Fry: How many atmospheres can this ship withstand?
Farnsworth: Well it's a spaceship, so I'd say anywhere between zero and one.