When a Worm dies, it would explode and only its grave can be seen after the detonation. There are multiple ways a Worm can die, but they only explode when their health reaches zero.
When they drown, nothing happens, they only sink to the bottom of the ocean, desperate for oxygen (and they also make a silly face in Worms 2 and a few other Worms games). However, when a Worm drowns in Worms 4: Mayhem and Worms: Ultimate Mayhem, they don't sink; they float for a few seconds and they explode in the surface of the water, slightly damaging nearby Worms. And when a worm falls into the water from a great height, they sink a little, then eventually rises to the surface of the water until they stay still, and then they explode.
In Worms 3D, Worms: Open Warfare and onwards, the Worms sink as usual - but in the case a worm walks directly into the water, they will drown in the surface, and explode instead of sinking, similar to the watery death of in Worms 4: Mayhem.
The explosion of the Worms are quite different in some Worms games. In the first and second generation Worms, and the Worms nowadays, the Worms destroy themselves with a TNT detonator when their health reaches zero. This is the 'classic' death of a Worm. But in Worms 4 and Worms Ultimate Mayhem, the Worms simply salute before they explode, and when they are poisoned, they explode right before they vomit. In Worms 2, they lose their breath before exploding.
Before a Worm explodes, they say things like "Oh no!" or "Bye bye" or "Oh dear" when their health reaches zero. In Worms 3D, the Worms have quite comical explosions. They have many different deaths when they have zero health, for example they swallow a grenade to kill themselves.
There is another way a Worm can die - in 2D Worms games, Worms can die if they jump or get knocked off the edge of a cavern level. Their death is shown off-screen, but you can hear them screaming or saying "Noooo!" as they fall into the water. In 3D Worms games, there are no cavern levels, so this kind of death is impossible for obvious reasons.