A lot of people are already vitamin D deficient and avoiding sun or using sunscreen more will make it worse. The health risks and consequences are much greater than that of sun exposure, which is likely why sun exposure decreases cancer risk and mortality rates substantially, despite the increased risk of skin cancer.