One of my favorite movies of all time is RockStar and that song just seemed like the best title for this post. I've seen this happen a lot of times when I've been out and about with musician friends at their gigs and their reactions were usually mixed, but every so often someone will jump the stage and join in with the band. I've never been able to really understand what kind of moxy that takes, but I know it's annoying to the members of the band.
D. Armenta has a good article to read if you've ever had the desire to do something as wild and impetuous as that: Just Don't. There are certain levels of proper introduction that may get you invited to join in on a song or two, and he'll tell you how here.
Aside from that, when you go out and see a band play at a club--just sit back and enjoy the show.