Sun exposure is a significant risk factor for various forms of skin cancer, including basal cell carcinoma, squamous cell carcinoma, and melanoma. The ultraviolet (UV) radiation from the sun can damage the DNA in skin cells, leading to mutations and potentially causing cancer.