Both contribute to cancer and aging. Sunburn is not a thermal injury. UVR directly damages small vessels and cells in the skin. The net result is that small vessels leak and inflammatory chemicals, including histamine and prostaglandins, are released. Direct and most reflected sunlight is most intense between 1000 and 1400.
Water is different.
Calm water absorbs UVR directed perpendicularly to its surface so it has its most intense effect before and after the 1000 to 1400 range noted. Even clouds allow some UVB to penetrate. Clothing has variable protection. Wet, white cotton is ineffective. To determine the SPF an artificial light is directed on two defined areas, one without protection and one covered by a predetermined amount of sunscreen.