Ultraviolet rays strike the skin and produces singlet oxygen and hydroxyl free radical out the water in the skin. Energy excites molecular oxygen, reverses the spin of one of the unpaired electrons and turns it into singlet oxygen that is more hazardous than the molecular oxygen because it can grab two electrons at a time. Due to the parallel direction of the spin of the two free electrons of molecular oxygen it can grab one electron one at a time. Hydroxyl radical is the most dangerous free radical that grabs electrons from molecules like the DNA resulting in mutation then tumor and cancer.
I got these from literature not out of experience. I have a Hub "Melanoma (Skin cancer): How to prevent and treat it."