Fossil fuels are made up of plants and animals that lived in the past and have been converted to fossil fuels by geological processes over time. And as plants convert the suns energy into sugars, fossil fuels are stored solar energy. The energy comes from the energy that was previously in dead plants/animals... to understand better read about the carboniferous period. It explains how fossil fuels were created, through the compression of decaying plant material that had lots of locked up carbon underneath layers of sediments. The sun.