Me thinks that Vitamin D has been getting a lot of coverage lately.
As for Vitamin D preventing cancer? Hmm. Well, there are other health benefits to be had. There was actually a recent article that showed that people with high Vitamin D levels had an increase in skin cancers. This is probably due to habitual sun over-exposure.
Perhaps the "old reference ranges" used in laboratories past were much lower than they are now, but that is probably because they were based on the idea of preventing rickets. It looks like the newer ranges are based on studies in "native populations" (non-westernized) which probably get more Vitamin D from both diet and sun exposure.
Vitamin D can only be produced by our bodies when we are exposed to UVB rays, and not UVA. Most UVB rays only occur between 10am-2pm in United States (except the southern tip of Florida) and that for 2-6 months of the year there are not enough UVB rays to stimulate Vitamin D production, i.e. during the winter, and more so the further north you go.
Tanning beds are a mix of UVA and UVB, though the newer ones (i.e. high pressure) seem to be just UVA, and hence would not stimulate Vitamin D production.