It can be said that fossil fuels contain stored solar energy because of age. Since it has been around for millions of years, it contains some solar energy from millions of years
I think its because over the as more & more & more layers of soil build up the plant gets older & as it gets older it begins to gather more energy from the soil & sun which , are related to solar energy