In terms of the most effective harm reduction injecting a sterile water solution is without comparison the most secure. IF however, you are going to inject something despite not having sterile water and thus taking water from the tap, you should boil the water and let in cool down. Boiling the water is still far from optimal, but a lot better than water directly from the tap.
Personally I would never risk injecting anything but sterile water, the consequence of an infection could be the amputation of a limb. A high price to pay for being too lazy to walk to the pharmacy.
Another important reason for using solutions from a pharmacy is that sterile water is not just water, but a solution of sodium chloride which is balanced in approximation with the levels of both in blood. Tap water can missing the two components can cause a number of serious side effects if too much is injected in the blood stream.
From wikipedia: Solution injected IV with a wrong solution of sodium chloride can "disrupt the patient's balance of sodium, potassium, magnesium, chloride, and other electrolytes. Hospital patients usually receive blood tests to monitor these levels. It is essential to correct these imbalances if they occur, as they can lead to the clinical symptoms of electrolyte imbalance, which, if left untreated, can lead to acidosis/alkalosis, and ultimately death".