Machines drove the Industrial Revolution, and coal drove the machines that drove the Industrial Revolution. By 1850, Britain’s coal mines were producing more than 10 times the amount of coal they’d produced in the previous century, which naturally meant greater demand for workers and greater demand for safety. (Not really about safety, but we can still pretend.)
Coal is a finite resource, so after it was removed from all the easy-to-reach places, it became necessary to dig for it other places, which meant coal mining got exponentially more dangerous. According to Letters and the Lamp, mining tunnels were cramped, prone to collapse, hot, and dark. Miners had to work by candlelight, but there was the small problem of trapped gas that was sometimes encountered in the tunnels, which was highly flammable and thus not really compatible with candles. Underground explosions were common and killed a lot of miners.
On May 25, 1812, 121 miners were inside the Felling Colliery mine on the northeast coast of England when there was an explosion. Ninety-two people died, including several boys as young as 8 and 9. Many of the bodies weren’t recovered for more than a month because it was still too dangerous to go into the mine to look for them. That was the disaster that finally made someone think about inventing a non-flammable miner’s lamp.