1α,25-dihydroxyvitamin D3 signals via the Vitamin D Receptor (VDR). Higher serum vitamin D is associated with thinner primary melanoma and better outcome, although a causal mechanism has not been established. As melanoma patients commonly avoid sun exposure, and consequent vitamin D deficiency might worsen outcomes, we interrogated 703 primary melanoma transcriptomes to understand the role of vitamin D-VDR signalling and replicated the findings in TCGA metastases. VDR expression was independently protective for melanoma death in both primary and metastatic disease. High tumor VDR expression was associated with upregulation of pathways mediating anti-tumor immunity and correspondingly with higher imputed immune cell scores and histologically detected tumor infiltrating lymphocytes (TILs). High VDR expressing tumors had downregulation of proliferative pathways, notably Wnt/beta-catenin signaling. Deleterious low VDR levels resulted from promoter methylation and gene deletion in metastases. Vitamin D deficiency (< 25 nmol/l ~ 10 ng/ml) shortened survival in primary melanoma in a VDR-dependent manner. In vitro functional validation studies showed that elevated vitamin D-VDR signaling inhibited Wnt/beta-catenin signaling genes. Murine melanoma cells overexpressing VDR produced fewer pulmonary metastases than controls in tail vein metastasis assays. In summary, vitamin D-VDR signaling contributes to controlling pro-proliferative/immunosuppresive Wnt/beta-catenin signaling in melanoma and this is associated with less metastatic disease and stronger host immune responses. This is evidence of the causal relationship between vitamin D-VDR signaling and melanoma survival which should be explored as a therapeutic target in primary resistance to checkpoint blockade.