The Emperor designed them to be able to fight under any condition and it's clear that this is the case with the amount of worlds (many consisting primarily of oceans) they conquered during the Great Crusade.
We just haven't had writers write about this because its probably somewhat difficult to have action scenes take place underwater without sounding boring.
The big difference between void warfare and submerged warfare is that the marines are weightless in the void, no gravity and all. They have magnetic boots that lock them onto the outside of hulls and platforms. That makes a lot mores sense to me. In water their weight would be a complete burden.
But they
are designed to fight under any condition so I wonder why authors
have avoided it. Its a huge potential to design marine naval vehicles and assault units. And there are definitely mentions of ocean worlds in the 40k universe. I think a book covering an underwater war on an ocean world commenced by a space marine chapter would be very interesting, personally. It seems odd this hasn't been touched in depth over the decades 40k has been around and I feel like its because authors know how silly and unbelievable it would be to have marines in power armor fighting underwater with any significant amount of mobility. If they decided on a way the Astartes get this done, it would be nice to know about.
The Laeran world in
Fulgrim was mostly ocean.
Unless someone remembers off the top of their head before I can find it, Im going to read the part about Solomon crashing into the ocean. Pretty sure there's no mention of him swimming but I'll double check.
There's also this bit about that campaign:
"Underwater cites were discovered within days of the campaign's opening and detachments of Astartes took the fight to the abyssal darkness of undersea trenches, smashing into structures that had never known the touch of sunlight, in specially modified boarding torpedoes fired from Imperial Cruisers hovering above the sea. Solomon Demeter led his 2nd Company against the first of these cities, subjugating it within six hours, his plan of attack garnering praise from his Primarch"
thats from warhammerwiki. I'll re-read that part too I suppose.