Ultraviolet light (UV) and chlorine (bleach) are both common methods of purifying water for drinking. Both have their advantages and disadvantages.
The main advantage for using UV is that it imparts no harmful chemicals into the water. Although a small amount of chlorine is not harmful, drinking chlorinated water for a long period of time can cause buildup in the body as well as weakening the stomach and intestinal linings. Bleach is very toxic, which is why it works to kill bacteria in water, but UV light passes through without adding to or changing the chemical composition of the water in any way.
On the other hand, chlorine can kill bacteria more efficiently than UV light; it works on cloudy or dirty water, since the chlorine dilutes into the water, and it keeps working the longer the water stands. UV light can be blocked by various particles and takes a long time to purify compared to chlorine, plus it stops as soon as the device is turned off.
One disadvantage to UV is that it requires a dedicated instrument with electrical power to work efficiently; if the batteries run out, the instrument is useless. In comparison, a single liter of chlorine can purify many gallons of water and is easily carried.
Finally, chlorine is able to kill more bacteria and other harmful organisms than UV; while UV is very effective at killing live organisms, chlorine can remain in the water and corrode the protective cell membranes of some strong bacteria. However, the more chlorine is used, the worse the water tastes, while UV doesn't affect the taste at all.