Insufficient exposure to sunshine, resulting in low levels of vitamin D, could play a part in a wide-range of diseases, from multiple sclerosis to rheumatoid arthritis, type 1 diabetes, some cancers and even dementia, scientists say today.

A study funded by the Medical Research Council, the Wellcome Trust and others, has succeeded in mapping the points at which vitamin D interacts with DNA. Scientists from Oxford University found that the vitamin exerts a direct influence over 229 genes that are known to be involved with certain diseases. Many of the diseases that are implicated are more common in the northern hemisphere than in sunnier, southern climes.

Scotland, for instance, has one of the highest rates of multiple sclerosis in the world. The disease is virtually unknown in Africa. The study, published in the journal Genome Research, lends substantial support to the hypothesis that the migration of humankind, hundreds of thousands of years ago, to the colder and darker parts of the world had an effect both on skin colour and on susceptibility to certain sorts of disease.

Research has previously suggested that the need to make more vitamin D resulted in the lightening of skin and hair of people who migrated to the north.

A lack of vitamin D has long been known to have an effect on bones. The theory runs that women who were unable to make enough vitamin D suffered from contracting pelvises, with the result that they and their unborn babies died in labour.

"Over a very long period of time, there has been a systematic selection for individuals that can cope with diminished sunshine," said Prof George Ebers, Action Medical Research professor of clinical neurology and one of the senior authors of the paper. He added: "It may be we have not had enough time to make all the adaptations we have needed to cope with our northern circumstances."

The good news is that – if the scientists are right – diseases such as MS are not genetically predetermined but a mixture of nature and nurture, says Ebers. The work will increase calls for changes in the advice on taking vitamin D supplements, which is not expected to help those already suffering from the disease, but could help future generations.

At the moment, authorities such as the Food Standards Agency say that most of us should be able to get all we need from a healthy diet, including oily fish and eggs, and "by getting a little sun". Pregnant women and older people might benefit from a small daily dose of vitamin D.

France already gives pregnant women a large supplementary dose of vitamin D, which is fat-soluble, so it stays in the body for some time.

The Scottish government has now agreed to a meeting in September with scientists to review the evidence, largely as a result of the Shine on Scotland campaign launched by 15 year-old Ryan McLaughlin, whose mother has MS, which wants vitamin D supplements for every pregnant woman and child.

Susan Polson, 60, who lives in Fife, was diagnosed with MS at the relatively late age of 46, causing her to have to give up her job as head secretary in a big independent school. She is on the committee of the research network of the MS Society in Scotland and takes vitamin D every day even though, she says, she is not expecting a cure.

"It is too late for me, but my grand-daughter Catriona is two. I don't want to think that because we didn't do anything about vitamin D, she has more risk factors," she said.