It has long been widely acknowledged that ultraviolet (UV) light is an environment risk factor that can lead to cancer, particularly skin cancer. However, it is worth noting that UV radiation holds potential for cancer treatment as a relatively high-energy electromagnetic wave. With the help of nanomaterials, the role of UV radiation has caught increasing attention in cancer treatment. In this review, we briefly summarized types of UV-induced cancers, including malignant melanoma, squamous cell carcinoma, basal cell carcinoma, Merkel cell carcinoma. Importantly, we discussed the primary mechanisms underlying UV carcinogenesis, including mutations by DNA damage, immunosuppression, inflammation and epigenetic alterations. Historically limited by its shallow penetration depth, the introduction of nanomaterials has dramatically transformed the utilization of UV light in cancer treatment. The direct effect of UV light itself generally leads to the suppression of cancer cell growth and the initiation of apoptosis and ferroptosis. It can also be utilized to activate photosensitizers for reactive oxygen species (ROS) production, sensitize radiotherapy and achieve controlled drug release. Finally, we comprehensively weigh the significant risks and limitations associated with the therapeutic use of UV radiation. And the contradictory effect of UV exposure in promoting and inhibiting tumor has been discussed. This review provides clues for potential clinical therapy as well as future study directions in the UV radiation field. The precise delivery and control of UV light or nanomaterials and the wavelength as well as dose effects of UV light are needed for a thorough understanding of UV radiation.