A review published in the journal Nutrients discusses a great deal of research that indicates vitamin D provides protection against internal infection. It regulates both innate (inborn, quick acting, short lived) immunity and acquired (promoted by response to an invasive organism and producing a long-lasting effect) immunity.
The researchers extoll the virtues of vitamin D in increasing the strength of both forms of immunity, and state that vitamin D deficiency is associated with an increased risk for various infections, including HIV, respiratory tract and HCV infection. However, when discussing the efficacy of vitamin D supplementation, they state that “robust data from controlled trials investigating the use of vitamin D as a preventive or therapeutic agent are missing.”
Unfortunately, the researchers indicate that sun exposure would be a good way to obtain vitamin D in correct amounts, but then destroy that argument by stating that …”UVB radiation is also the main cause of human skin cancer, thus it is difficult, if not impossible, to make a general recommendation to expose the skin to the sun for sufficient vitamin D synthesis.”
They are wrong, of course. Common skin cancers cause very few deaths, and melanoma, the deadly cancer, is far less common in people who are regularly exposed to sunlight, compared to those who avoid the sun. Outdoor workers have about half the risk of contracting melanoma as do indoor workers.
Another problem that the researchers have with sun exposure as a vitamin D source is this: People who live at high latitudes do not produce any vitamin D from sun exposure in the winter, because there is no UVB light at that time of year. My response to this is the following: Use UVB lamps or sunbeds. Such a suggestion would probably cause the authors of this researchers to melt down. I can hear them screaming “melanoma!” already. I would then direct them to a 20-year study from Sweden, which showed that women who used sunbeds during that 20 years had a 23% reduction in all-cause death risk compared to those who avoided sunbeds. And, they were not at increased risk of melanoma. Also, the subjects in the study who avoided sun exposure were twice as likely to die of any cause compared to those who had the highest sun exposure.
At almost any place on earth, we now have either the sunshine or UVB lamps that can give us the vitamin D we need and the other photoproducts that protect us from myriad diseases, including various infections. It is a shame that too many fail to take advantage.
 Juliana de Castro Kroner, Andrea Sommer and Mario Fabri. Vitamin D Every Day to Keep the Infection Away? Nutrients 2015, 7, 4170-4188.
 Godar D, Landry, R, Lucas, A. Increased UVA exposures and decreased cutaneous Vitamin D3 levels may be responsible for the increasing incidence of melanoma. Med Hypotheses 2009;72(4):434-43.
 Pelle G. Lindqvist, Elisabeth Epstein, Mona Landin-Olsson, Christian Ingvar, Kari Nielsen, Magnus Stenbeck & Håkan Olsson. Avoidance of sun exposure is a risk factor for all-cause mortality: results from the Melanoma in Southern Sweden cohort. J Intern Med. 2014 Jul;276(1):77-86.
Sun exposure and health By Marc Sorenson, EdD, Sunlight Institute…
New research shows that sunlight boosts the effectiveness of T-cells, an integral part of the immune system. T-cells are a type of lymphocyte that recognizes and binds to foreign invaders, thereby rendering them harmless. This is an important new finding, which demonstrates another beneficial effect of sun—one that has no relationship to vitamin D.
The key player in this action is the blue-light spectrum of sunlight that stimulates hydrogen peroxide production. The hydrogen peroxide (HP) causes T-cells to move to the site of infection, and it (HP) is also involved in the killing of noxious bacteria. Dr. Gerard Ahern, one of the primary investigators, stated it in this way: “T cells, whether they are helper or killer, need to move to do their work, which is to get to the site of an infection and orchestrate a response. This study shows that sunlight directly activates key immune cells by increasing their movement.”
Also interesting is the fact that the skin has a large share of the total T-cells in humans, about twice the number circulating in the blood. Think about this magnificent body of ours! It is programmed to immediately respond to any invasions that may occur in the skin, and sun exposure, if we take full advantage of it, immediately accelerates the process. Then, when the t-cells are activated by the blue light, they can move rapidly to other body areas where they can be utilized.
Sun exposure has also been found to have an exceptionally important and positive effect on autoimmune diseases such as lupus, MS, rheumatoid arthritis and others, many of which have been found to associate with low solar radiation and vitamin D. In this case, a different type of T-cell, called a regulatory T-cell, attacks the body’s own tissue, mistaking it for a foreign invader, and causes severe damage. The mechanism of autoimmune disease prevention by sunlight may be the suppression of regulatory T cells, in a manner that impedes the immune system’s attacks on its own tissues. 
Sunlight is one of God’s (or Nature’s) greatest miracles. Be sure to receive your full contingent of wonderful, non-burning sun.
 Thieu X. Phan, Barbara Jaruga, Sandeep C. Pingle, Bidhan C. Bandyopadhyay, Gerard P. Ahern. Intrinsic Photosensitivity Enhances Motility of T Lymphocytes. Scientific Reports, 2016;6:39479
 Schwalfenberg GK. Solar radiation and vitamin D: mitigating environmental factors in autoimmune disease. J Environ Public Health. 2012;2012:619381.
ArtukovićM1, Ikić M, Kustelega J, Artuković IN, Kaliterna DM. Influence of UV radiation on immunological system and occurrence of autoimmune diseases. Coll Antropol. 2010 Apr;34 Suppl 2:175-8.
Marsh-Wakefield F, Byrne SN. Photoimmunology and Multiple Sclerosis. Curr Top Behav Neurosci. 2015;26:117-41.