Sedimentary rock
Coal: peat to anthracite
At least 50% organic matter by weight, formed mostly from plant debris preserved as peat in swamps. With burial, heat (more than pressure or time) drives off water and volatiles and raises the carbon content: peat → lignite (brown coal) → sub-bituminous → bituminous (dense, black, often with bright and dull bands; about 84% carbon) → anthracite (hard, glossy, highest carbon, conchoidal fracture). About 90% of coal beds were deposited in the Carboniferous and Permian.
In thin section
Coal contains different plant materials (macerals) that can be identified under the microscope.

Photos are hosted by their original sites and shown under their open licenses (CC BY, CC BY-SA, public domain or Open Government Licence). Click a photo for its source page.
Other sedimentary rocks
Conglomerate and breccia · Quartz arenite · Arkose · Lithic arenite · Wacke (greywacke) · Mudrocks: shale, mudstone, siltstone, claystone · Limestone · Chalk · Coquina · Oolite · Travertine and tufa · Dolostone · Chert · Diatomite · Radiolarite · Evaporites: rock salt and gypsum · Banded iron formation · Oil shale
Sources
Rygel & Quinton, Sedimentary Geology 7.3: Organic-Rich Sedimentary Rocks · Wikipedia: Coal