The primary types of skin cancer associated with sunlight exposure are basal cell carcinoma, squamous cell carcinoma, and melanoma. Basal and squamous cell carcinomas are more common and generally less aggressive. Melanoma, although less common, is more dangerous and can spread to other parts of the body if not detected early.