The major function of vitamin D in vertebrates is maintenance of calcium homeostasis, but vitamin D insufficiency has also been linked to an increased risk of hypertension, autoimmune diseases, diabetes, and cancer. Therefore, there is a growing awareness about vitamin D as a requirement for optimal health. Vitamin D3 is synthesized in the skin by a photochemical conversion of provitamin D3, but the necessary rays are only emitted all year round in places that lie below a 35° latitude. Unfortunately, very few food sources naturally contain vitamin D and the general population as a results fail to meet the requirements. Fish have the highest natural content of vitamin D expected to derive from an accumulation in the food chain originating from microalgae. Microalgae contain both vitamin D3 and provitamin D3, which suggests that vitamin D3 exist in the plant kingdom and vitamin D3 has also been identified in several plant species as a surprise to many. The term vitamin D also includes vitamin D2 that is produced in fungi and yeasts by UVB-exposure of provitamin D2. Small amounts can be found in plants contaminated with fungi and traditionally only vitamin D2 has been considered present in plants. This review summarizes the current knowledge on sterol biosynthesis leading to provitamin D. It also addresses the occurrence of vitamin D and its hydroxylated metabolites in higher plants and in algae and discusses limitations and advantages of analytical methods used in studies of vitamin D and related compounds including recent advances in analytical technologies. Finally, perspectives for a future production of vitamin D biofortified fruits, vegetables, and fish will be presented.