Water ion composition is one of the more subtle ways to fine tune a beer, but if used in excess they can also make your beer unpalatable.
Keeping it simple will keep you out of trouble. In most of the United States tap water has a fair amount of sulfates, too much sodium and chlorine for most beers, and very little calcium. Mash enzymes need calcium to work effectively, and it is a vital nutrients for yeast. The challenge with this water is therefor boosting the calcium level without overloading the other minerals.
Boston tap water (used for Sam Adams Beer) has the following mineral profile:
Ca 4 ppm
Mg 1 ppm
Na 32 ppm
Cl 23 ppm
The overall hardness (or total dissolved solids) is low which allows it to be built up. If your water is hard (above 120ppm CaCO3) then you will probably want to use reverse osmosis water.
CaCl (Calcium Chloride) will make beer sweeter. For making a beer that has some malty sweetness to it Add 1/2 a tsp of Calcium Chloride to your grains for a 5 gallon batch of beer. This will add 49ppm calcium and 86ppm chlorine.
CaSO4 (Calcium Sulfate or Gypsum) will bring out the hop bitterness. For pilsners, lagers and light ales add 1/4 tsp Gypsum. For a middle of the road ale add 1/2 tsp. For Stouts add 3/4 tsp and for IPAs and other hoppy beers add 1 tsp.
CaCO3 (Calcium Carbonate or Chalk) for a dark beer that you want to add some mineral water qualities to add up to 1 tsp of Calcium Carbonate. Unlike the other brewing salts, chalk will raise the pH of the mash water, however most of the time the pH needs to be lowered in the mash to achieve optimal pH levels.
You can make it much more complicated that this if you want, but these basics should give you a starting point for fine tuning your beer.