The best source of vitamin D is sunlight. Vitamin D is produced under our skin when we are exposed to the sun. Very few foods are good sources of vitamin D, such as cod liver oil, cheese, egg yolks, etc. Sun exposure at least twice a week for 10 to 15 minutes can help prevent vitamin D deficiency.