A photocarcinogen is a substance which causes cancer when an organism is exposed to it, then illuminated.  Many chemicals that are not carcinogenic can be photocarcinogenic when combined with exposure to light, especially UV.  This can easily be understood from a photochemical perspective: The reactivity of a chemical substance itself might be low, but after illumination it transitions to an excited state, which is chemically much more reactive and therefore potentially harmful to biological tissue and DNA.  Light can also split photocarcinogens, releasing free radicals, whose unpaired electrons cause them to be extremely reactive.
The type of UV radiation determines the characteristics of photocarcinogenesis. For example, UVA radiation characteristically gives rise to reactive oxygen species (ROS) such as hydrogen peroxide whereas UVB radiation correlates with CPD lesions. The ROS are produced when endogenous photosensitizers are stimulated by UVA radiation. DNA absorption of UV radiation primarily leads to CPD and 6-4 lesions. The neighboring pyrimidines form a cyclobutane pyrimidine dimer in a CPD lesion. DNA absorption of UV radiation can also lead to TC, CC, and TT lesions but with much less frequency. The failure of DNA repair mechanisms to fix such lesions notably characterizes photocarcinogenesis. 
In addition, UV radiation often increases the production of cytokines such as interleukin-10 which indirectly hinder antigen presentation in cells. Moreover, UV radiation frequently leads to mutations in the tumor suppressor gene p53 in photocarcinogenesis. 
Determination of photocarcinogenicity can be accomplished using different techniques, including epidemiological studies and in-vivo studies.  In one in-vivo technique, hairless mice are exposed to suspected photocarcinogens, and are then exposed to different wavelengths of light, ranging from visible to UV-B. Tumor incidence is compared to control mice that have not been exposed to the drug or chemical being tested.
Melanin is not a photocarcinogen, because it dissipates the excitation energy into small amounts of heat (see photoprotection). Oxybenzone (a component of some sunscreens) is suspected owing to its skin penetrating qualities and its production of free radicals.  One medication that has been proven to be photocarcinogenic is psoralen.  This drug is used in photodynamic therapy for many inflammatory skin conditions, where the drug is combined with skin exposure to UV light.  Epidemiological studies dating back to the 1970s have shown a strong association between psoralen treatment and skin cancer incidence 5 to 15 years afterwards.  A logistic regression study has shown that there is a positive association between citrus consumption, both in the form of fruit and fruit juice, and risk of developing melanoma. This increased risk is most profound in fair-skinned individuals. The reason for this correlation is the high concentration of the photocarcinogenic compound psoralen in citrus fruits.