Vitamin D is synthesized in the skin upon exposure to sunlight and regulates calcium absorption and homeostasis. It is metabolized from 7-dehydrocholesterol to previtamin D to cholecalciferol with sunlight exposure, and absorbed into the bloodstream. Deficiency can lead to rickets in children or osteomalacia in adults by disrupting gene expression regulated by vitamin D nuclear receptors.