Wired has posted an article that explains why lithium-ion batteries explode, and what might replace them in the future.
But such technical excuses sidestep the fact that flammability and heat intolerance are long-standing problems that have plagued Li-ion batteries since they were invented almost 30 years ago. And as devices have gotten smaller in size but richer in features, things have only worsened. Forced to produce more energy in less space, Li-ions die faster (as early iPod owners found when their batteries wore out long before their players did), and their propensity for thermal runaway greatly increases.