The study is the first to correlate total blood levels of vitamin D in bowel cancer patients after their diagnosis - which includes that produced after exposure to sunlight and that obtained from dietary sources - with their long term survival prospects.
The University of Edinburgh team tested blood samples from almost 1600 patients after surgery for bowel cancer.
The greatest benefit of vitamin D was seen in patients with stage 2 disease, at which the tumour may be quite large but the cancer has not yet spread.
Researchers found that three quarters of the patients with the highest vitamin D levels were still alive at the end of five years, compared with less than two thirds of those with the lowest levels.
The results show that vitamin D is associated with a much better chance of cancer survival, although the nature of this relationship is not clear from this study.
The study's authors aim to set up a clinical trial to test whether taking vitamin D tablets in combination with chemotherapy can improve bowel cancer survival rates.
Measuring vitamin D levels in bowel cancer patients could also provide a useful indication of prognosis, the scientists say.
Professor Malcolm Dunlop, of the Medical Research Council Human Genetics Unit at the University of Edinburgh, said: "Our findings are promising but it is important to note that this is an observational study. We need carefully designed randomised clinical trials before we can confirm whether taking vitamin D supplements offers any survival benefit for bowel cancer patients."