According to Wikipedia and other sources, coal is a fossil fuel that forms when dead plant matter decays into peat and is converted into coal by the heat and pressure of deep burial over millions of years. The best conditions for the formation of coal deposits are as follows:
Wetland Areas: Vast coal deposits originate in former wetlands called coal forests that covered much of the Earth’s tropical land areas during the late Carboniferous (Pennsylvanian) and Permian times. These widespread areas of wetlands provided ideal conditions for coal formation.
Low-Lying Wetlands: The formation of coal begins in areas of swampy wetlands where groundwater is near or slightly above the topsoil. In these areas, layers of organic matter are accumulated and then buried.
Protection from Biodegradation and Oxidation: The process of coalification began when dead plant matter was protected from biodegradation and oxidation, usually by mud or acidic water, and was converted into peat.
Accommodation Space: Another key element required to form large coal deposits is an accommodation space – essentially a large hole – where organic matter can accumulate over long periods without being eroded.
Climate Conditions: Coals were originally formed from plants that require plenty of water or precipitation. Thus, regions with coal were wet and warm.