Scuba diving can be great fun. Exploring coral reefs and wrecks, swimming about with tropical fish and enjoying the view. Unfortunately you are at risk of ear infections. This is particularly in the warm, bacteria-laden waters of the tropics. The water swills through the ears, dropping of millions of bacteria as they go. This can lead to colonisation of the skin and the clinical signs of an infection.
The solution is to wear ear plugs for snorkelling and scuba diving. This should prevent ear problems from snorkelling and scuba diving. It is safe to wear plugs when diving in only a few metres of water but you definitely should not wear them if you are diving at depth. This is because the plugs create a trapped air space which can't be equalised with the outside world and so could result in rupture of the ear drum.
Scuba diving itself can cause a ruptured eardrum. This is especially true when the diver suffers from Eustachian Tube Dysfunction. This can prevent equalisation with the changing external pressure. Commonly the dysfunction is temporary due to a cold or other upper respiratory tract infection (URTI). This causes a problem by clogging the tubes with mucus and creating inflammation in the wall. This prevents the tube opening to allow air to pass through. The opening is the familiar *pop* you hear going up or down in a plane, or up or down a mountain.
A ruptured eardrum is a reason not to dive. The delicate middle and inner ear structures are exposed to the high pressures from the water with no physical barrier to protect them.