Yes, Vitamin D can be toxic if it accumulates to excessive levels in our bodies. Vitamin D is fat-soluble, which means it gets stored in our tissues instead of being excreted. So, when somebody ingests excess amounts of Vitamin D, especially over an extended period of time, Vitamin D can build up to dangerous levels. Because Vitamin D promotes absorption of Calcium from our food, the biggest risks are mostly related to excessive Calcium absorption, and can include kidney stones, constipation, heart irregularities, psychosis, and even death [1,2].
On the other hand, sun exposure cannot cause Vitamin D toxicity because sunlight destroys any excess Vitamin D produced by our skin [3,4].
The safest ways to maintain healthy blood levels of Vitamin D are regular short exposures of large areas of your skin to sunshine, and regular supplementation with moderate doses of Vitamin D capsules. It can be dangerous to ingest large doses of Vitamin D. If you are concerned that you might be Vitamin D-deficient, you should consult your physician.
REFERENCES
Marcinowska-Suchowierska, E. et. al. 2018. Vitamin D Toxicity-A Clinical Perspective. Front. Endocrinol. 9:550.
Galior, K. et. al. 2018. Development of vitamin D toxicity from overcorrection of vitamin D deficiency: A review of case reports. Nutrients 10:953.
Holick, M. et. al. 1981. Regulation of cutaneous previtamin D3 photosynthesis in man: skin pigment is not an essential regulator. Science. 211:590.
Holick, M. 2006. Resurrection of vitamin D deficiency and rickets. J. Clin. Invest. 116:2062.