Unfortunately, we don't get vitamin C from sun exposure. Vitamin D is the nutrient that our bodies produce.
Overexposure to the sun's UV(ultraviolet) rays damages our skin over time, leading to hyperpigmentation and aging skin.