"After all these years they've finally got round to asking us," says Mick Jagger, famous tongue firmly in cheek. On one level one of the world's biggest festivals and its most enduringly colossal rock band feel like an inevitable match but it's taken years for Michael Eavis to persuade the cash-conscious Rolling Stones to leave the stadium circuit for a field in Somerset. Having finally agreed, the Stones have enough sense of occasion to know that this is a show they can't phone in.

From the moment the riff from Jumpin' Jack Flash rings out across the darkening field they seem right at home. Jagger even sings a comic new song, Glastonbury Girl, which mentions ecstasy and wet wipes. They look like fabulous caricatures of themselves: Jagger a prancing dandy, Keith Richards a mummified pirate, Charlie Watts a dignified gentlemen's tailor somehow tricked into drumming.

It's been a long time since the Stones have been considered a threat to public morals but the old black magic still crackles through death-of-the-60s anthems like Gimme Shelter and Sympathy for the Devil, during which a giant metal phoenix atop the stage sprouts wings and spurts fire, while Miss You remains white rock's most improbably great foray into disco.

What's most striking after all these fractious years is their apparent warmth. Within the perfectly paced set are fond showcases for Richards (You Got the Silver) and ex-guitarist Mick Taylor (Can't You Hear Me Knocking) and, throughout, infectious pleasure in still playing such extraordinary music together.

There are many more debutantes this year, all of a somewhat fresher vintage. The weekend's first Pyramid stage highlight is Haim, a trio of Californian sisters gifted with warmth, charisma and infectious songs that suggest cloudless west coast skies. "I think this is the best moment of my life right now," says bassist Este with stunned delight. Savages are presumably excited too, but a smile would spoil their reputation as Britain's sternest band. Their short, sharp shock of a set in the William's green tent has the unnerving tension of breaking glass and sharpening blades.

Festivals demand a certain energy level that isn't kind to more subtle artists. On the Park stage, Solange's bittersweet R&B doesn't rise above a leisurely stroll until the closing punch of Sandcastle Disco and Losing You. Mercury winners Alt-J's milky art-rock could be blown away by a stiff breeze on the Other stage, while Tame Impala's insular psychedelia only occasionally soars.

Conversely, acts that sound bluntly simplistic on record draw huge crowds. The Lumineers, essentially the US franchise of Mumford & Sons, capitalise on Britain's strange new appetite for hootenanny stomping, old-man hats and wood-crafted hokum. Dizzee Rascal has mutated from thorny grime upstart into a shameless ham, and it's paid off spectacularly. There are genuinely terrific songs, including a cover of Disclosure's White Noise with vocalist Aluna Francis, amid much gonzo idiocy: Arse Like That is gallantly dedicated to "all the ladies who are fat-arsed". An hour later, Francis reprises White Noise with Disclosure, whose house music proves so popular that the Sonic tent overflows in all directions.

The Friday headliners appeal to diverse moods. Chic turn the West Holts field into an open-air disco, delivering million-selling hits with the regularity of a jukebox. On the Pyramid stage, the Arctic Monkeys sound confident and powerful, with gorgeous new string arrangements by Elbow's Guy Garvey, but still lack that instinctive bond between band and crowd that makes a truly great headliner.

The smaller crowd at the Other stage confirms that Portishead aren't for everybody but they hit spots that nobody else can. They're formidable musicians who can turn on a dime from tremulous torch songs (Roads) to roaring post-punk techno (Chase the Tear), while the brutally heavy Machine Gun becomes an anti-Trident protest. In an unexpectedly comic touch, the video screens flash up the face of David Cameron, firing red lasers from his eyes. But the dominant mood is emotional bloodletting. Nobody expresses hope, heartbreak and vengeful fury with such unwavering conviction as Beth Gibbons.

Saturday afternoon was so sun-blessed and youthful, from Azealia Banks's hectic hip-hop to Noah and the Whale's deft soft-rock, that Elvis Costello's injection of age and venom felt especially bracing. Costello is a showbiz pro who rattles through the hits with ease and ends with a raucous cover of the Rolling Stones's Out of Time. But Thatcher-era protest songs such as Shipbuilding and Tramp the Dirt Down strike a different note: a rare and welcome reminder of the festival's dissenting roots.

Primal Scream dissent too but Bobby Gillespie's grievance is with the crowd, heckling them for being insufficiently enthusiastic about a set frontloaded with new material. Bonhomie is finally restored with a euphoric final trio of songs featuring Haim on backing vocals – songs so indebted to the Stones that, backstage, a confused Keith Richards may be wondering if they're some of his.

The night belongs to the Stones. By turning on the charm as well as the formidable back catalogue, they prove themselves well worth the wait.