What is the difference if I'm brewing all grain or extract?
As Brewmex41 said, the biggest issue is pH, or more specifically alkalinity, but really that's only part of the story. With extract, the mineral content of the water isn't much of a much, as the part of brewing where where it is a major factor is the mash. While some mineral content is necessary for healthy yeast, as a rule the quantities needed are small. Chloride and sulfate ions affect the expression of hop acids, with chloride smoothing it out and sulfate increasing the sharpness, but only a moderate amount of either is needed to have an effect.
The major issue in all-grain is the pH of the mash water and sparge water - which are two separate issues. For optimum enzymatic action, the pH of the mash should be between 5.3 and 5.8, with 5.6 being about the best. However, the pH of the mash will vary depending on the kilning of the malt and the proportions of dark malt and lighter malt, as well as on the mineral content of the water. Water that has a lot of alkalinity in it, especially carbonate hardness, will raise the pH, while large amounts of darker malt will lower it. As a result, hard water tends to favor darker beers, and influenced the development of both stout and dunkel, while soft water is better for lighter colored beers, the premiere example being the almost mineral-free water at Pilsen. This is why a certain Colorado based mega-brewery boasts about the quality of their mountain stream water - snow melt is almost free of minerals, so it is great if you happen to be making an ultra-delicate pale lager.
It is possible to adjust the mineral content in various ways, by adding mineral salts or diluting with distilled or RO water, but it can be a bit tricky, and it is much easier to add ions than remove or dilute them. As a result, soft water is generally preferable for homebrewers over hard water, even when brewing dark beers, as suitable additions of chalk can bring the pH up enough for the darker beers, while little needs to be done for pale beers.
After the mash is done, you (usually) also have the sparge water, which has to be filtrated through the grain bed. As the sparge progresses, though, more and more of the acidity gets washed out of the grain bed, and the pH begins to rise. This is a problem, unfortunately, as tannins in the grain hulls are more soluble in basic water than in acidic water, so you begin to get an increasingly astringent runoff. The solution once again is to lower the pH, either with mineral additions or with food-grade acid, or both. Sparge water should have a pH between 5.4 and 5.8, with 5.6 again being the sweet spot.
This is just an overview of the issue, and I'm handwaving some parts of the story. it should give you some idea of the why it matters more in all-grain than in extract.