Ultraviolet (UV) light is a form of radiation that acts as a mutagen, an agent that causes mutations in DNA. Exposure to ultraviolet light causes chemical changes that alter the shape of your DNA, and the process that corrects DNA's shape can also cause changes to the DNA code. Sunlight is a strong source of UV light and it can cause damage to the DNA in the surface layer of your skin after repeated or prolonged exposure, increasing your risk for skin cancer.
Ultraviolet light is radiation in wavelengths from 200 to 300 nm (nanometers) found in natural sunlight, sun lamps and tanning beds. DNA sucks in UV light like a sponge because the most intense portion of DNA's absorption spectrum (wavelengths of 250 to 260 nm) complements the peak energy emission of UV light (240 to 280 nm). Because of the UV component of sunlight, UV light is the most common source of DNA-damaging radiation. Fortunately, UV light is a weak form of radiation and it does not penetrate past the surface cells of your skin.
DNA is a double stranded molecule, similar to a ladder twisted around its rungs. Each strand on the side of the ladder consists of strings of chemical letters called deoxyribonuclease bases that form the "rungs" by binding to a partner on the opposite strand. The bases in the double strand of DNA always pair up with the same partners on the opposite strand: a thymine with an adenosine, and a cytosine with a guanine. Cytosine and thymine are called pyrimidine bases.
Exposure to UV light can cause two pyrimidine bases sitting next to each other on the same strand to bind to each other, instead of binding to their partner on the opposite strand. That chemical glitch is called a pyrimidine dimer, and it produces a bulge in DNA wherever it occurs. If you sit in the sun for just a few hours, thousands of pyrimidine dimers can form in your DNA, causing thousands of bulges along your DNA strands.
Your cells cannot read past or copy the bulges in DNA. A cellular process called excision repair will fix the bulge so that the DNA can make proteins and copy itself, but the process is flawed. One base of the pyrimidine dimer is snipped out of the strand, and a new base is substituted in. The replacement base, however, is inserted randomly, and there is only a 1 in 4 chance that it is the same as the base that was removed. The excision repair process introduces DNA mutations, and every mutation increases your risk for developing skin cancer.