coal mines are dangerous because of flammable gasses like methane that can accumulate (gather together). a lamp with a naked (exposed) flame might make these flammable gasses catch fire, causing an explosion, which could kill people. the safety lamp prevents the hot flame of the lamp touching the flammable gasses, reducing the chance of an explosion.