Apocalypse Now creepily deconstructs this, when "Ride of the Valkyries" is played as the American helicopters shoot up a village. Because of the unpleasant connotations "Valkyries" has picked up, and the decidedly unheroic nature of the scene, it's not exactly rock-out material.
Played with in Back to the Future. During the dance, everybody gets impressed by Marty's rendition of "Johnny B. Goode" until he gets carried away with his guitar solos (bearing in mind that he is in 1955, and rock'n'roll wouldn't become popular until a few years later), leaving everyone in the gym in awkward silence.
In Blues Brothers 2000, when the Blues Brothers do "Ghost Riders in the Sky," they summon bad weather, the devil's herd, and the ghost riders; lightning even strikes down a sniper. And the "In the Blood/John the Revelator" sequence was certainly doing something.
In The Buddy Holly Story, Holly and the Crickets are signed up by a record company sight unseen and booked at Harlem's Apollo Theater on the impression they're a black group. When the curtain opens on stage, stunned silence hits with a thud - then they start playing and inside a minute the racial barriers of the time have dropped and everyone is enjoying themselves. As Little Richard had said this really happened, this should apply to the Real Life subtrope too.
Close Encounters of the Third Kind has the humans finally making contact with the aliens by playing a particular musical sequence (sol la fa fa do, where the second fa is an octave below the first). At which point a human/alien jam begins. It's implied that this is a test of sorts to see if we're worth talking to; as tests go, it's not a bad one.
At the end of the Ralph Maccio film Crossroads, it came down to a blues guitar duel with the devil's servant, Jack Butler, played by and based onSteve Vai.
A minor example in Cry-Baby, but still funny. The movie is set among teenagers in Baltimore, Maryland, in 1954 - on the eve of public-school integration. The title character, who is the leader of the "drapes," announces that he is about to sing something "colored" - causing the leader of the "squares" to cringe up and shriek.
In Evolution, singing "You Are So Beautiful To Me" brings the flying monster to the main characters in the mall, only for the poor thing to be gunned down.
As far as movies that play the "fight for your right" angle totally straight, Footloose is easily the ultimate example. "Dancing is not a crime!"
In If I Stay, Adam's song for Mia is what persuades her to return to her body. Even moreso, Beethoven which album put over her ears convinces her to stay alive long enough to hear the song.
J-Men Forever, a 1979 Gag Dub of Republic Film Serial clips, has the villainous Lightning Bug scheming to conquer the Earth with Sex, Drugs, and Rock & Roll. His rock broadcasts from the Moon are powerful enough to cause cars to crash, cities to collapse, and record moguls to commit suicide. The J-Men counter this by broadcasting schmaltzy music, and the Lightning Bug eventually blows up the Moon when he cranks up his stereo too loud.
In Kelly's Heroes, Oddball's tank crew play loud music when they roll out into combat, to psych themselves up as well as confuse the opposition. They're reluctant soldiers at best and hope that their show of bravado will intimidate the enemy so badly there won't be a fight.
In Knights of BadassdomThe magic that brought forth the succubus demon isn't spoken, it has to be sung. So when the book manages to get destroyed in the climax, aspiring Doom Metal singer unleashes one of his own songs on the beast to summon his dead friend to destroy the demon and send it back to hell.
The Disney Channel Original Movie Lemonade Mouth is this, but this time, to save a Lemonade vending machine from being removed. They succeeded, and later became rock stars.
At the climax of Lisztomania, Richard Wagner mutates into a combination of Frankenstein's Monster and Adolf Hitler, and he wreaks mass destruction on the world with the dark side of the power of rock, firing a guitar that is a machine gun. Franz Liszt saves the world by blasting off in a fighter jet whose controls are a musical keyboard, and destroys Wagner in an aerial assault with the power of rock, then flies off into heaven singing "Liebesträume."
In Mad Max: Fury Road, one of the most massive cars in the Big Bad's forces is the "Doof Wagon", which is basically a stage on wheels with speakers galore, holding a team of four Taiko drummers in the back and a Warboy, the Coma-Doof Warrior shredding on a flame-spewing electric guitar on the front. Martial music has apparently graduated to the next level after the apocalypse.
In the live-action Masters of the Universe movie, Kevin uses his electronic keyboard to open a portal to Eternia, thereby allowed He-Man to return to Eternia and face down Skeletor.
Add heaps and heaps of The Power of Love to this, top it off with a Bittersweet Ending, and you've got yourself Once. It's honestly a very good movie, mostly because they play this trope completely straight.
By the end of Purple Rain, Prince's life has devolved into one hot mess, beset with family trauma, girlfriend troubles, and professional problems in his music career. But, in the final scene, he picks up his guitar and magically uses it to make everything OK again, by turning out a brilliant, masterful, achingly beautiful performance of the title song, ending on a note (literally) of triumph.
Rock 'n' Roll High School. The Ramones using rock and roll to take over a high school? It doesn't get much cooler than that.
While they did not played music, the Kissmyanthia army from Role Models deserves a special mention for they are based on the legendary rock band KISS.
Against the Katayanagi Twins, Sex Bob-Omb is in an amp-vs-amp rock battle. The Katayanagi's music summons two dragons. Sex Bob-Omb's music summons a giant sasquatch, which proceeds to beat the shit out of both dragons.
He also has magical, musical powers in the totally insane short film Ghosts.
He also saves an entire planet with music in the 3-D film Captain EO.
In the short film that forms the climax of Moonwalker, Michael fights... bad people... or something... and he turns into aTransforming Mecha... point is, it involves music somehow.
Realising that hand-to-hand combat is ineffective against the telekinetic super-vegan Todd Ingram, Scott attempts to resort to a bass guitar battle in order to gain the upper hand; a battle which Todd wins in style by power-chording Scott through the nearest wall.
The "Fight For Your Right" sequence that opened the original version of the Black or White short film.
While Matthew Patel is the only one actually utilising music in the fight (his Bollywood-esque song, "Slick" summoning his Demon Hipster Chicks and revealing his ability to throw fireballs), Scott manages to sufficiently stun Matthew long enough for him to deliver the knockout blow by hurling a cymbal from Kim's drum kit like a frisbee.
Main villain of Slumber Party Massacre II is a supernatural rockabilly who kills his victims with an electric guitar infused with a power drill. He does a random musical number before impaling one of his victims. Moving on...
In Tenacious D in The Pick of Destiny, a shard of the devil's tooth is used to create the best rock music of the ages. Jables dreams of using the pick to perform supernatural musical feats, such as literally blowing his audience's minds and bringing women to orgasm. The band later gets into a rock-off with the devil over the fate of their souls. The devil's song is a "masterpiece" and their song is "fucking lame," so the devil tries to take Kage to hell. He fires lightning at Kage, prompting Jables to leap in front of the blast. By pure dumb luck, the lightning strikes the reflective "JB" logo on Jables's guitar, and is bounced back at Satan, knocking his horn off, which allows Jables to send him back to Hell.
In Trick or Treat, Sammi Curr returns from the dead by the power of playing his record backwards.
In the comedy Water (1985) the island of Cascara wins its independence thanks to a reggae performance at the United Nations by local rebel Delgado (Billy Connolly) who has sworn never to speak until Cascara is free (so he communicates through song). Unfortunately a Running Gag in the movie is Delgado's awful singing, so the Cascarans think they're stuffed until a cameo appearance by George Harrison, Ringo Starr and Eric Clapton save the day.
Wild Zero! Japanese rock band Guitar Wolf fights off zombies and UFOs with the power of ROCK AND ROLL! It is awesome! ROCK!!!!!
In Young Einstein, an atomic beer keg is going to go off because it has reached supercritical mass! What can our hero do? Why, plug an experimental electric guitar into it and rock out! What else? A physicist listening on the radio notes with awe: "Electrified music played in 4/4 time!?! That would drain the power out of anything!"