Melanoma is a malignant form of skin cancer, and it is associated with sun exposure, to what extent researchers are still trying to discover. Paradoxically, past studies have shown that indoor workers have an increased risk compared to outdoor workers.
It’s also been suggested that high vitamin D levels might have some protection against melanoma and melanoma progression, but this has yet to be confirmed in high quality studies. If this were true, coupled with the evidence that outdoor workers have a decreased risk of melanoma, then the most prudent advice may be to seek moderate sun exposure as opposed to no sun exposure or overexposure.
In a recent ecological study, researchers have found a relationship between UV radiation and melanoma that might also fall in line with the above evidence and line of reasoning.