The vitamin produced by animals when exposed to sunlight is Vitamin D. When animals are exposed to sunlight, specifically ultraviolet B radiation, the skin converts a precursor molecule known as 7-dehydrocholesterol into pre-vitamin D3.
Vitamin D plays a crucial role in maintaining calcium and phosphate levels in the body, which are essential for bone health, teeth, and overall skeletal development. It also has important functions in immune function, cell growth, and neuromuscular function.