The American Journal of Epidemiology just released several studies on vitamin D and cancer that concluded vitamin D levels were not correlated to several cancers; that is, higher levels of vitamin D did not correlate to lowered cancer rates. The key to understanding this finding is that in each case, the levels were measured prior to the diagnoses of cancer. Prediagnostic measurements occur at one point in time and do not measure changes that occur between the measurement and the onset of the disease. If, after the moment of vitamin D measurement, habits of sunlight exposure or diet change, vitamin D levels can fluctuate considerably. I believe that Vitamin D levels at the time of diagnosis are much more indicative of the affects of vitamin D on the risk of disease, and my opinion is that optimal higher vitamin D levels that are maintained for long periods are much more likely to reduce disease risk. Dr. William Grant, in an email today, told me he believed …”serum 25(OH)D levels measured several years ago aren't a good indication of either lifetime 25(OH)D or recent 25(OH)D." 25(OH)D is the measurement labs use to assess serum levels of vitamin D.
A randomized controlled trial (RCT) that maintains similar supplementation amounts for a period of years could give a good indication of whether consistently higher vitamin D levels have a protective affect on cancers. Let’s suppose, for instance, that one group of randomly chosen women received a vitamin D supplement for four years and another group received a placebo during that same time. All of the women would be free of cancer when the study began. Then, at the end of four years, the women would be assessed for the number of cancers in each group, and it could be determined if the supplemented group fared better than the placebo group. This is known as a randomized, placebo-controlled interventional study, and is considered the “gold standard” of research. Obviously, if the vitamin D group fared far better than the placebo group, we could confidently state that consistently higher vitamin D levels over four years correlated strongly with reduced risk of cancer. But wait—we already have such a study. Lappe and colleagues already conducted the study described above and found that the vitamin D group had 60-77% lesser risk of all cancers, compared to the placebo group, after four years. None of the studies published by the American Journal of Epidemiology were RCT’s. This is strong indication that the use of prediagnostic levels of vitamin D may not be of much value.
Also interesting is the fact that the authors of these papers mention that research shows sunlight exposure correlates to a rather impressive risk reduction in most of the cancers studied. There are two outstanding papers, one very recent, which demonstrate that relationship. 
Based on what we have just discussed, it is possible that (1) regular sunlight exposure maintains consistently higher levels of vitamin D and results in reductions of cancer similar to those demonstrated in the research conducted by Lappe and colleagues, or (2) sunlight has positive influences of cancer beyond the production of vitamin D. My opinion is that the answer lies in a combination of both. We are beginning to see more research showing that in both cancer and multiple sclerosis, sunlight exposure may have its own anti-cancer benefits. Sunshine is, of course, the most natural way to produce vitamin D. Just be very careful not to sunburn.
 Lappe, J. et al. Vitamin D and calcium supplementation reduces cancer risk: results of a randomized trial. Am J Clin Nutr 2007;85:1586–91.
 Grant WB. Does solar ultraviolet irradiation affect cancer mortality rates in China? .Asian Pac J Cancer Prev 2007;8(2):236-42.
 Chen W, Clements M, Rahman B, Zhang S, Qiao Y, Armstrong BK. Relationship between cancer mortality/incidence and ambient ultraviolet B irradiance in China. Cancer Causes Control.2010 Jun 16. [Epub ahead of print]