Chlorine is an extremely electronegative element, which means that it "wants" an electron very badly. This means that it tends to oxidize molecules it comes into contact with by removing electrons. The outermost shell of a chlorine atom has 7 electrons, but it a full shell is filled with 8. This creates a large force which tends to strip electrons from other atoms, and it is this property that makes chlorine such a good chemical for disinfectants and sanitizing agents, as well as other applications.
Any element with 7 electrons in the outermost shell will have similar properties. Thus other elements in the same column of the periodic table as chlorine will have similar properties. Elements in this column form what is called the Halogen series, which is composed of fluorine, chlorine, bromine, iodine, and astatine. Fluorine is the most electronegative of these elements, and in fact is often more dangerous than chlorine.
In fact, bromine and iodine can both be used in place of chlorine for water purification, though chlorine is more effective. Alternatives to pure chlorine for water purification purposes include Sodium Hypochlorite, Chloramines (combination of chlorine and ammonia), Calcium hypochlorite, and Chlorine dioxide. For non-chlorine compounds, options include bromine (a popular choice for spas) and persulphates. Persulphates are also called active oxygen; they are effective against fecal waste and bacteria, but not algae. Some of the more popular persulphate solutions on the market are Soft and Easy and Duo tabs.
A different option sometimes used in water purification is ozone, which is a form of oxygen. This requires a unique apparatus, rather than just an application of chemicals, and also requires some small amounts of chlorine. Copper or silver ionizers are sometimes used for the same effect, and also require supplementary chlorine.
Polyaminopropyl Biguanides (PAPB) can be used in place of chlorine, but this application is very difficult to set up. Because the treatment will not work when there are any traces of chlorine present, this is a better option for new pools and treatment systems.
For on-the-go water purification, iodine tablets are often used in place of chlorine. This is because iodine is less toxic than chlorine, and so is less likely to cause poisoning.