Depends on the circumstances, but even somewhere like Texas, flashing a gun at someone not on your property who isn't threatening you just because you're annoyed is probably going to get you a felony conviction and your right to have guns taken away. If it's actual legal "brandishing," it might trigger the right of the person you're doing it to threaten to shoot you preemptively.
If they're actually on your property, you're probably okay in Texas to make a gun visible while ordering them to leave, but whether you can actually point it at them and threaten them directly would depend on circumstances.
Anyone who frivolously waves around guns is, of course, an absolute imbecile.
So I can't really say where it turns illegal, because it depends where you are, what they're actually doing beyond playing loud music, and under what circumstances you'd be legally within your rights to do it if they were on your property. It'd be a good Branca question though.