Some of the vitamin deficiencies are fairly straight-forward. Vitamin D is not the case. Most people in the northern hemisphere know that the further north you live, the less sunlight you get. Less sunlight is less UV light and UVB is responsible for converting inactive Vitamin D into a metabolite that can be used by the liver/kidney.
We learn a lot about calcium homeostasis in vet school as calcium is extremely important in the normal function of the body. Vitamin D is required for this homeostasis as it increases calcium absorption from the gut. In short, a Vitamin D deficiency leads to a deficiency in calcium.
When I think of Vitamin D deficiencies, I think of reptiles first. There is a condition called Metabolic Bone Disease, which is most commonly secondary nutritional hyperparathyroidism.
Since Vitamin D is needed for calcium homeostasis, a deficiency in Vitamin D leads to a deficiency in calcium, because even if you are consuming calcium, you need the Vitamin D to absorb it from your diet. Reptiles that do not get Vitamin D3 in their food and/or do not have UV light exposure (that isn't blocked by glass), will be calcium deficient. Since calcium is required for bone structure, the deficiency in Vitamin D leads to osteoporosis, osteomalacia or fibrous osteodystrophy. Calcium is not just important in bone structure, it is important in the contraction of muscles as it regulates sodium channels in depolarization of the neurons and can cause paresis/paralysis of the limbs (something we see in sugar gliders - as an aside). For humans, a lot of dairy products are fortified with Vitamin D3 to prevent rickets (poor bone formation in children). Humans can get Vitamin D from conversion in the skin from direct exposure to UV light and from consumption in their diet. More on this later.
If you're in second year veterinary school, you may be asked to write out the pathophysiology of this condition. If you're studying for board exams such as the NAVLE, if you get a case of a reptile with deformities, think of Vitamin D deficiency. In brief, when there is low Vitamin D, you get low calcium absorption from the gut, and this causes hypocalcemia. Hypocalcemia leads to an increase in parathyroid hormone release from the parathyroid glands. Parathyroid hormone signals to the bones to cause osteolysis by osteoclasts. Eventually there is not enough calcium in the bones to hold them together, causing deformities. Parathyroid hormone also signals to the kidneys to convert more Vitamin D into the active form (1,25-dihydroxycholecalciferol) signaling to absorb more calcium from the gut.
Along with an effective hypocalcemia, a lot of the foods offered to reptiles are higher in phosphorus. Phosphorus binds with calcium, contributing to poor absorption of calcium from the gut. Another condition that is important in calcium and phosphorus regulation is chronic kidney disease, but I won't get into that here.
You have to be careful with Vitamin D3 supplementation, as you can get the opposite, Vitamin D toxicity. Unlike Vitamin B's and C, Vitamin D is fat soluble and excreted from the liver into bile and out in the feces. If they patient is over-supplemented, the Vitamin D will contribute to mineralization of soft tissues.
Have I confused you enough??
Ok, Vitamin D3 is the supplemental form of Vitamin D also called cholecalciferol. Cholecalciferol is not active in the body until it is converted by the liver to 25-hydroxycholecalciferol which is then converted to 1,25-dihydroxycholecalciferol by the kidneys - this is the active form of Vitamin D, in a nutshell.
UV Light and Vitamin D
So where does sunlight or UVB light come into play? There are species differences in the ability to convert pro-vitamin D into Vitamin D3 (cholecalciferol) in the epidermis (skin), which seems to be show that more carnivorous species get their Vitamin D3 through dietary intake, and the more herbivorous/omnivorous species getting it through UVB light conversion in the skin. In the skin of these herbivorous/omnivorous reptiles (adult bearded dragons and iguanas for example), the compound 7-dehydrocholesterol is converted to cholecalciferol (which is then converted as above). I told you it was complex.
When the reptile hobbyist comes in and says, they have a UVB light therefore, they don't supplement Vitamin D3, check to see that the UVB lamp has been replaced often enough. The rule of thumb is to change the UVB bulb every 6 months. So if they say they change it when it burns out, that is not sufficient. Additionally, the mesh will block some of this UVB light, and glass/plastic/plexi blocks UV light. A few reptile breeders may have a UV light reader, while most reptile owners do not, so unless they are measuring the UV light at the spot where their reptile basks, it will be difficult to know how much UV exposure they are getting. Ideally, they are not using a material that blocks UVB between the lamp and the basking spot for their reptile, and that the reptile is both not too close and not too far from the UV light. A basking spot that is about 12 inches (1 foot) from the lamp is a good measurement. Greater than 18 inches is too far, and less than 6 inches can lead to UV burns (sunburn essentially).
The bonus of using UVB light to convert Vitamin D is that excessive exposure will not lead to Vitamin D toxicity, so wherever possible, having a UV light for reptiles is ideal, even for the crepuscular/nocturnal species of reptiles. I have some folks say that the enclosure is close to a window, so they don't supplement UV light. However, windows are impermeable to UV light, and there is reduced metabolism of Vitamin D in the skin because of this. Air permeable mesh is probably the best option for containing your reptile, and allowing the UV light to access their basking spot in an amount that is ideal.