Rechargeable Li-ion batteries are generally very safe. They are used by hundreds of millions of people every day in devices like laptop computers and cell phones. They store a lot of energy, however, so learning how to care for them is important. Rarely, and usually only after they have been abused, they can be dangerous, even to the point of venting with smoke and flames. Inside a watertight flashlight, a venting event can create pressures so large that the tail cap and head are blown off at high velocity.
The biggest issue for flashlight owners is preventing over-charge and over-discharge. In a mobile phone or laptop, there are special circuits that control this. In flashlights, more of the responsibility falls on the user.
The other big issue for flashlight owners is making sure that batteries are matched by brand, date-of-manufacture (as best as possible), charge, and capacity when they are used together in series and parallel configurations. More on this below.
Over-discharge means draining too much energy out of a battery. Most of the Li-ion batteries used in flashlights are designed to be charged to 4.2 volts. During usage, that voltage falls. Most of the energy is long gone by the time you reach 3.0 volts.
Manufacturers publish lower limits for discharge voltage for each battery they make. Typical values for Li-ion batteries range between 2.5 volts and 2.8 volts. Continuing to use a battery after it gets this low leads to over-discharge.
By itself, over-discharge is not usually dangerous. The problems come when you try to recharge a battery that has been over-discharged. Sometimes, but not always, that leads to the venting events mentioned above.
Depending how low the voltage actually goes, you can sometimes safely recharge a battery after over-discharge. This is especially true if you recharge immediately after the over-discharge occurs. I say this not to encourage you to try this, but just to emphasize that the dangers are not as omnipresent as a casual reading would lead you to believe.
Li-ion batteries are cheap. If you determine that you have over-discharged one, you should recycle it. Do not attempt to recharge it.
Over-charging can occur if the safety systems in a battery charger fail. Li-ion chargers are supposed to stop charging at 4.2 volts. If they continue charging significantly beyond that, it is possible to trigger a venting event. Some no-name and xxxx-Fire chargers have performed poorly in testing. Often, it is a failure to properly terminate charging that gets them a poor review. When you buy a charger, you should select one that has been given a good rating by a knowledgeable reviewer.
All Li-ion batteries, even "unprotected" ones, have safety features built in. One of these is a membrane called a shut-down separator. When a battery overheats, it is designed to shut-off ion transport inside a battery. This stops current flow. In order to prevent explosion, all batteries have a vent that blows open when internal pressure rises too high in a battery.
In addition to these features, "protected" batteries have a printed-circuit board that monitors voltage and current in a battery. These will shut down the battery when current becomes too high or when voltage becomes too high or too low.
When two, three, or more Li-ion batteries are used together, it is crucial that they be matched. That means they should be the same brand and model, and that they should have been purchased at the same time, preferably in the same package.
In addition, they must have the same charge. Do not use a fully charged battery together with one that is only half charged.
They must also have similar capacity. Here I am not talking about the rated capacity that is printed on the label. I am speaking about the actual capacity. That is something that declines as a battery ages. If one battery holds significantly less energy (i.e., has less capacity) than its mate, it will go into over-discharge while the other battery is still chugging along.
Where batteries are connected in series, reverse current can flow in a discharged battery, supplied by its mate that still has power. This can trigger a venting event.
With all the safety systems that are built into Li-ion batteries, you can see why the number of people who have a one actually catch on fire is so low. More than one safety system has to fail before you get into trouble. Nevertheless, failures do happen. The fire threat is real.
Unless you have a flashlight that demands unprotected batteries because it uses high current, I recommend using only protected batteries. Use only high-quality batteries and chargers. Purchase only from dealers you trust. Random sellers on Amazon and ebay do not qualify.