Water is a vital ingredient in a cup of coffee as it makes up around 90 per cent by volume of an espresso and 98.5 per cent of a cup of filter coffee. If the water doesn't taste good to start with, neither will the cup in the end - if you can taste the chlorine the resulting cup will be terrible. In most cases a simple water filter (such as a Brita filter) will do a good job of removing negative tastes, however it still might not produce the perfect water for brewing coffee.
Water acts as a solvent, doing the work of extracting the flavours in the coffee during the brewing process. This is where the quality of the water plays a major role, as the hardness and mineral content can significantly affect how the coffee brews.