Currently the Scallop unit from the Amphibious Operations lab stacks ridiculously well in underwater engagements, able to avoid all non-torpedo fire, whilst having comparable range to everything except a sniper sub. When put with Clams for repairs and resurrection and Anglers to deal with any air (namely, Shadows), Scallops completely dominate all sea warfare with almost no exceptions. There are a few very good ways to deal with them, however;
-- Try terraforming small 3x3 platforms out of the water and placing your static torp launchers on them. This makes them completely immune to torpedo fire meaning the only thing you should have to worry about are Grizzlies which can be dealt with by your own torpedoes.
-- Make a wall or trench on the sea floor using terraforming; since amphibious bots walk on the bottom, they will be stopped by terrain features. Whilst enemy Clams can Restore the terrain to make it pathable again, this gives you precious seconds to lay into them. You can make beaches and other access points sheer cliffs to prevent them from walking up on them, as well. If you make your walls high enough you can put buildings like winds on top of it to prevent his clams from terraforming it back.
-- Buy a Shield Bot Factory and make several "Aspis" Shield Walkers. Shields work underwater to block torpedoes, giving your troops a massive edge in underwater combat. This is a blessing if you are playing Ships too because torpedo boats and subs both are very unwieldy and extremely easy to pick off. Protect everything you can with shields and you're set.
-- "Shadow" Precision Bombers can strike targets underwater, and due to the nature of Scallops and Clams to pack tightly together, their precision bombs with small AoE can wipe out clusters of them with ease. Only thing to watch out for are Anglers, which will swat you like a fly. Try using decoy planes to make them waste their missile packs; it's easy to do this 'cause they have to pop out of the water before they can shoot, and by the time they do they are likely to discharge every missile they've got on a single target.
////
If you are playing Ships and you see Scallop mass with Clams, it's probably time to switch facs; the stack is simply impossible to beat with unwieldy torpedo boats and submarines that can't properly retreat. He has superior mobility, support and firepower, so you need to change tactics to beat him. Torpedo boats die by the dozens if thrown against Scallops, and he can simply pick up every one you destroy with his Clams. Not to mention the attacks of both those and Submarines are simply too spread out to be used effectively. But switch your battle plan to amphibious bots of your own, paired together with shield walkers, and you've got it made.
Yes, I realize we have the Sniper Submarine, but how many shots -- how many Scallops -- can one take down before it has to retreat? All the while the entire stack is marching inexorably towards your infrastructure. You may be able to beat it with enough sniper subs, but it's usually a better idea to try something else. Sniper subs are just too easy to swarm and surround for my liking.