I've actually done a lot of research, especially on geological ages and such, asking the same questions.
Some stuff I found:
-The oldest coal beds come from the first period in which true trees appear. At that time there were no organisms around that could digest lignin effectively, so it piled up in the soil over long periods of time.
-Later coal beds formed in similar ways to modern conditions. Generally, in colder climates, peat bogs build up material due to waterlogging and high acidity preventing complete breakdown of organic material. This occurs in bogs, swamps, in tropical forests in Africa where they receive excessive rain every year, and in places like the UK where there is plenty of rain and underlying rocks which hold lots of
water.
-Methane comes out of bogs and things, but it is decomposed in the atmosphere by UV radiation within about 10 years. Methane is also involved in the formation of atmospheric ozone. Most of the stable methane on earth occurs near the ocean floor, where anaerobes break down detritus that falls from photic zones above, and where the water pressure is so high that the methane bubbles condense and are trapped.
For the global warming theorists:
During most of earth's history the earth was warmer and more humid than it is today. Also, polar regions such as Antarctica historically have been ice-free for most of the year. The fact that the ice caps and greenland ice sheet persist is the defining marker of an ice age, which we are currently experiencing (albeit taking a short break from glaciation). If you think global warming is scary, consider what a glaciation would be like:
Once a glaciation begins it becomes a runaway process. Within 10-20 years, almost without warning, miles-thick ice sheets descend from the poles and build up to cover and crush most of the continental area that humans currently occupy. This includes all of Canada, most of the US, a lot of South America nearly to Brazil, most or all of inhabited Europe, most of China, and possibly some of Africa as well. The seas retreat as the water is distributed onto the continents as ice, and in the remaining un-iced areas rain becomes scarce. A permanent El Niño occurs, and these conditions persist for usually 50-100 thousand years before another short "interglacial" like we see today. The entire ice age lasts around 100-150
million years.
IMO most of the problems we see today are caused by destruction of topsoil by plowing, deforestation which changes the microclimate unfavorably, and abuse of groundwater resources.
As for the questions about CO2 and plant growth, under sunlight and warm conditions plants can grow up to twice as fast, with up to 1500ppm CO2. CO2 concentrations have little effect on animal life, although high CO2 disturbs oceanic life forms as the acidity prevents proper formation of calciferous parts. O2 concentrations have varied much more than CO2, with CO2 ranging from about 4500ppm before plants colonized the
land, to about 2200ppm afterwards, and much lower today. O2 affects animals (esp insects) to a much greater degree. The highest recorded O2 levels were ~32%, occurring in the Carboniferous period, whence the largest insects ever discovered lived.
Apparently a lot of CO2 and O2 gets sucked up by rocks, forming oxides (like rust) and a variety of carbonates. I have no idea where all of that O2 went, or why O2 levels dropped so much more than CO2 levels did. I have yet to see a good explanation or any proof, and it doesn't seem to be a big question that paleontologists pay attention to.