This is in essence the whole process of photosynthesis. Without the chemical energy plants and other autotrophs would be unable to survive. Photosynthesis arose very early in the history of our planet and is obviously a significant evolutionary advantage. Geological evidence has suggested that oxygenic photosynthesis came to prominence about 2 billion years ago. This was proceeded even earlier by Anoxygenic photosynthesis.
Evidence for this can be seen when considering the photosynthetic patterns of different bacteria. The nonsulfur purple bacterium Rhodospeudomonas viridis has most of its features common to oxygenic photosynthesis and yet clearly predates it. Green sulfur bacteria such as Chlorobium thiosulfatophilum carry out a reaction that appeared before oxygenic photosynthesis. They use reduced sulfur species as the electron donors in the reaction, as oppose to water.
CO2 + 2H2S --------> (CH2O) + 2S + H2O
Throughout time the process of photosynthesis has evoloved in to the form of which is common today in all green plants. Author: Alexander Coward (document modification date: 15th May 2003)