Here is a good resource that has very detailed information about Li-Ion hazards:
Lithium-Ion Batteries Hazard and Use Assessment
(Lithium-Ion Batteries Hazard and Use Assessment. Celina Mikolajczak, et al. July 2011. Fire Protection Research Foundation)
I will summarize it below:
- What is the chemical composition of Lithium Ion and Lithium Polymer battery?
Cathode material varies, most commonly either LiCoO2 or LiFePO4 are used. Anode is usually graphite (carbon) based. The largest fire hazard is the electrolyte: this consists of lithium salts dissolved in an organic solvent.
The organic solvent is comparable to gasoline in flammability. There is some ongoing research to non-flammable electrolytes, but they are not yet in common use, and probably do not work as well as current electrolytes. A non-flammable electrolyte would greatly reduce the fire risk, but the high temperature could still ignite e.g. plastic parts nearby.
- Why do rechargeable Lithium Ion & Lithium Polymer batteries explode or catch fire?
The batteries store a large amount of energy. If this energy is accidentally released by e.g. short-circuit or physical damage, it will heat up the battery. In addition, when the temperature exceeds about 150°C, the lithium in the battery will start to react chemically and release even more heat, which is called a thermal runaway.
When the electrolyte liquid heats, it will expand, and at some point the pressure exceeds the strength of the battery casing. The batteries are designed with an over-pressure vent, which should allow the electrolyte to leak out relatively slowly. If the vent malfunctions, the only way out is for the battery casing to explode.
No matter how the electrolyte got out, it is flammable and the battery casing is probably very hot at this point. This will often cause the electrolyte to ignite, releasing even more energy and possibly causing other battery cells nearby to overheat also.
- Why cannot the rechargeable battery explosions and catching fire be prevented?
They are prevented, to a very large extent. Compared to the amount of li-ion batteries currently in use in the world, very few fires occur. Most of the fires that do occur are from low-quality products that do not have the safety systems such as protection circuit and often also overload the batteries.
But ultimately it is similar to "why cannot house fires be prevented". When you have flammable materials and energy in the same place, eventually they'll combine to cause a fire.