Very important. Yes, mineral levels vary for different types of beer. There are a lot of calculators and books on achieving the correct water profiles for brewing.
With that said, you can brew a good or even great beer without focusing too much on your water. That's what I did for many years. Over the past year or two, I've started working on my water treatments and my beers have gotten markedly better.
Remember, water is the biggest ingredient in your beer. There is even a brewing book available called "water". It's important!