The process in which organisms use water along with sunlight and carbon dioxide to make their own food.