A dead car battery can explode if sparks occur. When a battery ages it loses water leaving the lead plates exposed to the air inside the battery.
A source of sparks that could ignite the dead battery could be the battery itself when you're either trying to jump start the car with the dead battery or try to charge the dead battery back up.
It's best to always wear safety goggles when working around any car batteries.
When Jump Starting a car to avoid sparks always connect the Jumper Cables to the dead battery first and then connect the jumper cables to the good battery.
Connect the negative battery cable to the dead battery and then connect the other negative cable to the good battery and then connect the positive cable to the positive side of the dead battery and then go back and connect the positive jumper cable to the good battery.