Meh, nothing is legal when used for that purpose. With the current state of affairs in this wonderful rights infringed upon country of the USA, why the fascist commie bastards have actually made it illegal to actually blow anything up!!!! the horror! the horror! Lighting off an actual m-80 firecracker, or ANY explosive device in utah is a second degree felony, and possessing one is a 3rd. Attempting to possess one is a class A misdemeanor. This is normal for each state. Although certain states like S.C. and WY have somewhat more lax laws usually in allowing simple black cat firecrackers, but utah is hardly unique. It's laws tend to be on the lax side. And the laws do not make a distinction between a dry ice bomb, m-80 firecracker, a chemical bomb, or 100 lbs of ammonium nitrate prill soaked in oil.
As a side note, you can buy ammonium nitrate prill at your local grocery store, quite legally, with nobody regulating it. Despite the federal building bombing in Oklahoma city all that time ago, the substance is far from regulated. And no hints on how to buy it. Just stating it as a very very easily acquired explosive component, along side dry ice and household cleaning chemicals. All of which can be used to blow something things up quite nicely. The point is zero distinction by the law for the severity of the explosion, excepting only conditions that could be construed as terrorism, which then earn you a nice trip with no trial looming in the near future, to some nasty nasty federal prison wherever they can find a hole to forget about you in.
The real kicker, guess what the definition for what is a terrorist action is? There is no practical definition. All definitions of terrorism are bound up around the concept of an action to induce terror in others. Difference between someone blowing something up for fun, and someone blowing something up to induce terror? intent. As nobody can read minds to prove your actual intent, they are free to interpret your actions however they wish, and in whatever light they wish, innocent until proven guilty be damned. You probably won't get arrested for terrorism if you blow a few things up. You also probably won't die if you are smart about it. But some people DO die from DIY explosives and ballistics. Also some people DO go to jail. regardless of being smart about it, or being careful. etc.
And for those who will say "but I've seen M80 firecrackers! they aren't illegal" all currently sold firecrackers, even the ones that LOOK like the old M80s have MUCH MUCH less then 80mg of gunpowder in these days. they are simply a different package on a fairly weak firecracker, to make it louder and look bigger then a black cat. They do have a little more powder then a regular firecracker, but not enough to blow off a finger anymore.