This detonation in 1946 (known as the Baker Test) is part of Operation Crossroads in Bikini Atoll in the Pacific. The same device design that was used to bomb Nagasaki. The bomb was detonated 90 feet underwater amidst a fleet of decommissioned US and seized Japanese vessels. It was meant to simulate and document the effects of nuclear weapons in naval warfare. Later, in the 1950s, a series of large thermonuclear tests rendered Bikini unfit for subsistence farming and fishing. Because of radioactive contamination, Bikini remains uninhabited as of 2011, though it is occasionally visited by sport divers.
A fleet of 95 target vessels was assembled in Bikini Lagoon. At the center of the target cluster, the density was 20 ships per square mile (7.7 per km²), three to five times greater than military doctrine would allow. The stated goal was not to duplicate a realistic anchorage, but to measure damage as a function of distance from the blast center, at as many different distances as possible. The arrangement also reflected the outcome of the Army/Navy disagreement about how many ships should be allowed to sink. The target fleet included four obsolete U.S. battleships, two aircraft carriers, two cruisers, eleven destroyers, eight submarines, numerous auxiliary and amphibious vessels, and three surrendered German and Japanese ships. The ships carried sample amounts of fuel and ammunition plus scientific instruments to measure air pressure, ship movement, and radiation. The live animals on some of the target ships were supplied by support ship USS Burleson, which brought 200 pigs, 60 guinea pigs, 204 goats, 5,000 rats, 200 mice, and grains containing insects to be studied for genetic effects by the National Cancer Institute. Amphibious target ships were berthed on Bikini Island.
Bikini Atoll is probably the most nuked place on Earth and you can still see the craters from the giant hydrogen bomb explosions but amazingly it’s also teeming with life these days.
Why they detonate a nuclear weapon under water? Water’s a pretty good shield against radiation, the lethal effects due to radiation would be less than for a ground/airburst. And, for most average nuclear weapons the “prompt” (as opposed to long-term) lethal radius for radiation isn’t normally much wider than the radius of heat / shockwave (i.e. you’ll probably be burnt to a crisp or pummelled to bits before starting to glow in the dark). Of course, there’s rather a large volume of instantly-vaporised steam to deal with, and rather a large shockwave propagating through the water, so just because the little fishes don’t glow in the dark doesn’t mean there’s not huge devastation and loss of life. In short: There would be a near-term devastation due to non-radiation causes (heat pulse, shockwaves), some but probably not much irradiation of the near area, and marine wildlife would re-populate from outside the destruction zone fairly rapidly I’d expect. Longer-term, the usual side effects but probably diffused by water currents over a wider area than normal and therefore at a lower rate.