The process by which plants and other photoautotrophs convert light energy into chemical energy, including oxygenic photosynthesis and non-oxygenic photosynthesis.