Putting power cables underground certainly helps, and IMHO should be done, especialy in places prone to storms or hurricanes. However it does not eliminate power cuts by any means, the high voltage grid lines that transmit power in bulk can not be readily or affordably put underground and remain vulnerable to storm damage. The risks can be reduced by reinforced construction, and duplicated routes.

Small grid transformers if mounted on or below ground level are vulnerable to flooding. They generally consist of a steel tank in which the transformer is immersed in oil.
Such transformers will continue to work just fine in a flood provided that the water does not reach the top of the tank, if this occurs it is liable to go bang, either because water got into the oil, or because the connections went under water.

Here in the UK transformers are much larger, and fewer in number, than in the USA. They are generally placed in small purpose built brick sheds, the top of the transformer is often about 5 feet above ground level and therefore only vulnerable to very deep floods. In areas that flood repeatedly the transformer and related switchgear is sometimes raised on a concrete plinth.

However in central London these transformers are often in basements, and a number of localised blackouts have been caused by floods, either from storms or from burst water mains.