Cuba is diver's paradise and there are more than 30 dive centres around the island. Remember that the south and west coast resorts are calm for most of the year, while the north coast is better in summer. Sharks attacks are very rare, though silky sharks and whale sharks are seen. Costs are around $30 per dive including the basic gear.
Most dive centres also offer certification for about $350-400 on a two week course CMAS and ACUC certification is more common than the US PADI or NAUI certificates. There are also brief courses for around $60. Also note that while you can rent suits, fins etc, they are often in poor condition and you'll need to bring along your certificate to rent keen divers should bring their own suits etc.
One of the best places to combine diving with a beach/sightseeing holiday is Playa Ancon near Trinidad see Beach Cuba and Cuba's must-sees, However, dive freaks come over all of a quiver when they talk about Playa Maria La Gorda in the far west, beyond Vinales. Maria La Gorda is around five hours from Havana, more than two hours from Vinales and Pinar del Rio and only really accessible by car. The one hotel is the Hotel Maria la Gorda is very remote and right on the beach. It is, however, small, so book, and fairly basic $20-50pn.