Does the sun give you vitamin d?

Sunlight helps. Vitamin d3 is made in the skin when 7-dehydrocholesterol reacts with ultraviolet light of uvb type at wavelengths between 270 and 300 nm, with peak synthesis occurring between 295 and 297 nm.These wavelengths are present in sunlight when the uv index is greater than three, which occurs daily within the tropics and daily during the spring and summer seasons in temperate regions.
No. The sun does not provide you with vitamin d, but uv light from the sun converts the inactive form of vitamin d that we eat to the active form that can be used by the body.