Ultraviolet (UV) light kills cells by damaging their DNA. The light initiates a reaction between two molecules of thymine, one of the bases that make up DNA. The resulting thymine dimer is very stable, but repair of this kind of DNA damage--usually by excising or removing the two bases and filling in the gaps with new nucleotides--is fairly efficient. Even so, it breaks down when the damage is extensive.
The longer the exposure to UV light, the more thymine dimers are formed in the DNA and the greater the risk of an incorrect repair or a "missed" dimer. If cellular processes are disrupted because of an incorrect repair or remaining damage, the cell cannot carry out its normal functions. At this point, there are two possibilities, depending on the extent and location of the damage. If the damage is not too extensive, cancerous or precancerous cells are created from healthy cells. If it is widespread, the cell will die.
Bonnie K. Baxter, chair of the biology program at Westminster College of Salt Lake City, adds the following:
Basically, UV kills cells because of the accumulation of DNA damage. A gene product, called p53, is one of the responsible parties for slowing the cell cycle and checking for damage. If the damage is fixable, p53 sends in the repair machinery. If the damage is too extensive, it directs the cell to apoptosis, or programmed cell death.