Like most vitamins, most of the claimed effects of Vitamin D turn out to be unprovable. It does however,
help with absorption of dietary calcium:
Being deficient in vitamin D can cause intestinal absorption of dietary calcium to fall to 15%.[1] When not deficient, an individual usually absorbs between 60-80%.[1]
There's no provable effect on cancer or depression, though.