Vitamin D decreases the risk of cancer, perhaps because it's toxic to cancer cells. The other theory is that D bolsters the ability of the guard dog p53 gene to spot cancerous cells and kill them. Most Americans don't get enough D because we're indoors most of the time, and when we're outdoors, we're wearing sunscreen.
We recommend getting 800 international units a day if you're younger than 60 and 1,000 international units if you're over 60. You can do it through supplements or food (though you probably won't get more than 300 or so international units through food alone, so supplementation is smart.) Getting some sunlight (as long as you are careful not to get too much) is also protective.
You cannot get enough sun in most of the United States and Canada between October 1 and April 15 to turn inactive vitamin D into active vitamin D. So we recommend you get insurance D in foods supplemented with vitamin D3 or in supplements. Don't get more than 2,000 international units a day.