photosynthesis is the process by which green plants make their own food using the sun 's energy , water and carbon dioxide .