The process by which plants convert light energy into chemical energy and synthesize organic compounds.