Lithium ion batteries are being used for about 2 decades now. Their use is increasing exponentially and they are becoming an important part of the renewables economy. They can store considerably more energy than other rechargeable batteries, so they are used in many electronic equipments, small tools, airplanes and, recently, electric vehicles (EV). Due to their ability to store more energy, they can overheat and potentially cause fires from thermal runaway.
In 2013, there were fires related to the lithium ion batteries of Boeing 787 Dreamliners so the whole fleet had to be grounded until the problem resolved. Also, in the same year, fires were reported from Tesla S autos and overheated lithium ion batteries were the cause.
The problems leading to batteries eventually overheating and causing thermal runaway fires are poor designs and post shock states. There are many types of lithium ion batteries, of all these the safest are the ones made of lithium iron phosphate.
Overall, lithium ion batteries are safe under laboratory conditions. However, real life situations expose the tools or vehicles containing the batteries to shocks or crashes. Not all designs are flawless. Significant investments needs to be made in the design and protection of these batteries, since they are going to become an even greater part of a future powered with more renewable sources of energy.