1102
xkcd #2948: Electric vs Gas
(xkcd.com)
A community for a webcomic of romance, sarcasm, math, and language.
Not really. Its trees from a time before micro organisms evolved the ability to eat dead trees. These days, the solar energy collected by trees will get used to power the metabolisms of fungi before those trees can get buried and eventually become new coal & petroleum.
I suppose an impact from a sufficiently large asteroid could turn the entire crust of the planet into magma, sterilizing it and therefore opening the possibility that new oil might be created some day.
IIRC it is actually mostly from algea. A small amount from some fern-like plants. By the time trees existed, they were being broken down by bacteria.