Prostate cancer is the second common cancer in men worldwide. The prevention of prostate cancer remains a challenge to researchers and clinicians. Here, we review the relationship of vitamin D and sunlight to prostate cancer risk. Ultraviolet radiation of the sunlight is the main stimulator for vitamin D production in humans. Vitamin D's antiprostate cancer activities may be involved in the actions through the pathways mediated by vitamin D metabolites, vitamin D metabolizing enzymes, vitamin D receptor (VDR), and VDR-regulated genes. Although laboratory studies including the use of animal models have shown that vitamin D has antiprostate cancer properties, whether it can effectively prevent the development and/or progression of prostate cancer in humans remains to be inconclusive and an intensively studied subject. This review will provide up-to-date information regarding the recent outcomes of laboratory and epidemiology studies on the effects of vitamin D on prostate cancer prevention.