Coal forest

Coal forests were huge areas of wetlands which covered much of the Earth's tropical land areas in the late Carboniferous (Pennsylvanian) and Permian times. 
At the time most continents were crowded together in the supercontinent Gondwana. They lay on the path of tropical rainfall. As vegetable matter from these forests decayed, enormous deposits of peat accumulated, which later changed into coal. Now those continents are wide apart, but they have the coalfields which those ancient forests left behind.
Much of the carbon in the peat deposits produced by coal forests came from photosynthetic splitting of carbon dioxide. This released oxygen into the atmosphere. This increased the oxygen level, perhaps as high as about 35%. This had the effect of making the air more easily breathable by animals with limited respiratory systems. This may explain the size of "Meganeura" compared to modern dragonflies.
The coal forests covered tropical Euramerica (Europe, eastern North America, northwesternmost Africa) and China. Eventually, climate change devastated these tropical rainforests. The so-called Carboniferous rainforest collapse was caused by a cooler drier climate which broke up the rainforest ecosystem. The cause of this change was mountain uplift, no doubt caused by the continental plates squeezing against each other. During most of the rest of Carboniferous times, the coal forests were restricted to North America (such as the Appalachian and Illinois coal basins) and central Europe.
At the very end of the Carboniferous period, the coal forests underwent a resurgence, expanding mainly in eastern Asia, notably China. They never recovered fully in Euramerica. The Chinese coal forests continued to flourish well into Permian times. 
Later coal measures.
The conditions which led to the late Carboniferous coal measures returned twice later on. These occasions were in part of the Jurassic period, and the Eocene. The later Jurassic left coal measures in parts of Europe and Australia. The Waloon coal measures are where the fossils of "Iguanodon" were found. The coal in Queensland, Australia is from the same time. 
Conditions in the Paleocene and Eocene were also favourable to plant growth. The coal from this time is found in Chile, Nepal and in the so-called Eocene Okanagan Highlands in British Columbia and Washington State.