Final answer:
Vitamin D is produced by the body when the skin is exposed to sunlight, which is essential for healthy bones. A deficiency can lead to bone diseases such as rickets and osteomalacia.
Step-by-step explanation:
The vitamin that the body produces when the skin is exposed to sunlight is Vitamin D. When UV radiation from sunlight strikes the skin, it triggers the synthesis of Vitamin D3, or cholecalciferol, from a cholesterol derivative present in the epidermis. This cholecalciferol is then converted by the liver into calcidiol, which is subsequently converted into the active form, calcitriol, by the kidneys. Vitamin D is crucial for the absorption of calcium and phosphorous, essential for maintaining healthy bone structure. A deficiency of Vitamin D can result in bone diseases such as rickets in children and osteomalacia in adults.