Sunlight contains ultraviolet as well as visible light.
The ultraviolet component generates a variety of forms of DNA damage. Of these, the most frequent is thymine dimers. People suffering from Xeroderma pigmentosum variant have mutations in the XPV gene, otherwise known as the gene encoding polymerase eta. Wild-type polymerase eta can synthesize DNA past thymine dimers, and when it does so it inserts two adenine residues opposite the thymine dimer. In other words, the new DNA strand synthesized by pol eta has the correct sequence, and no mutation is created.