Oil and natural gas were formed from sea creatures. The energy stored in the fossil fuels originally came from sunlight. Plants used light energy from the Sun for photosynthesis to make their chemicals. This stored chemical energy was transferred to stored chemical energy in animals that ate the plants.