So I was wondering if it was legal to sell fan merch while only using the groups name for tags. The name wouldn't be listed under the product or could i say its xyz inspired. If this is still bad, what about using their actual names instead of the group name because I don't think its trademarked.
Band names usually are trademarks. For Example AC/DC is trademarked in the US for Auto parts (REG: 5849299) Music, Picks and Bags (REG: 86551440) and pretty much any other thing used as merchandize (REG:75982466). Oh, and they are a famous mark with their AC-thunderbolt-DC.
Not every band does go out and pay trademarking fees and register their trademark, but in the united-states they are not obligated to! They use their name in the marketplace, they possibly have their own merchandize, so you infringe on their market.
Other countries have different rules, for example germany has the "first registered" rule - whoever registers a mark first gets it exclusively, no matter who registers it.
As Trish says, band names are often protected as trademarks. If the name is so protected in the country where the merchandise would be sold, using the name, or any variation of it, would be trademark infringement unless permission is obtained. In some countries, trademarks must be registered to be protected. In others, including the US, trademarks in use are also protected even if not registered.
Note that trademark protection must generally be separately established in each country, and does not automatically extend to other countries, unlike copyright.
Moreover, even if there is no trademark issue, any published image of the band is probably protected by copyright. Any use of such an image, or of any image based on such a copyrighted image, without permission, would be copyright infringement. Copyrights do not need to be registered in any country that adheres to the Berne Copyright Convention. That includes all but a few countries in the world.
In short, unless you obtain permission from the band or its authorized agent, there are significant legal risks in this idea. The bands might not notice and sue, but they might, and might well win a substantial judgment. The details would depend significantly on what country this would be in, and the exact facts of the case.
The other answers don't address an important aspect of this question, whether the use of the trademark in meta tags is allowed. Trademarks are allowed to be used without permission of the trademark holder in certain circumstances, mainly to identify the particular product. It is not a trademark violation to state that your hardware has drivers for Windows 10, or that your after market car parts work on all Ford pickup trucks.
You get into trouble when your use makes it look like you might be the trademark holder. For almost this exact case there is caselaw from 2008: North American Medial Corporation v Adagen Medical International, Inc. In this case Axiom used trademarks exclusively in meta tags on its website and the court ruled this was infringement.
At least that is how it works in the United States. If you were in Canada, then there is caselaw saying exactly the opposite in Red Label Vacations Inc v 411 Travel Buys Limited