Dating back to the ’50s when NBC’s “The Tonight Show,” hosted by Steve Allen, featured an ensemble led by pianist Lyle “Skitch” Henderson, house bands have become a latenight talk show staple.

Allen was known to tinkle the ivories now and then (his jazzy piano accompaniment to Jack Kerouac’s reading of “On the Road” in 1959 is the stuff of legend), so the pairing seemed natural. But for those who followed in his footsteps, a house band served to give the host a kind of hipster cred, while providing much needed interstitial entertainment for the show’s live audience, with guests often given their own musical fanfare.

“It’s a vital part of the format and adds so much energy, especially for the audience during the commercials,” says Jimmy Kimmel. “There’s a lot that goes on that you don’t see or hear on television, and we’ll have audience members come up and sing, and we have such a versatile band they can play along with anything.”

Adds Jimmy Fallon, only half-jokingly: “Latenight TV’s all about keeping people awake, so having a good band is key.”

So how do bands land these coveted latenight gigs? Surprisingly, neither Kimmel nor Fallon went through an exhaustive auditioning process to find their ideal musical partners. “We grew up best friends in Vegas,” says Kimmel of bandleader and saxophonist Cleto Escobedo. “He was a musical prodigy, and when ABC offered me my show, I prayed that they’d let me hire Cleto, and to my amazement they agreed, sight unseen.”

To forestall “any future problems,” Kimmel then took the ABC president and his team to see the band play live. “They were blown away, and they loved the idea that he’s my best friend and that his dad’s also in the band.”

For Fallon’s part, he was already a fan of the Roots, and went after them at the suggestion of a friend. “By some miracle they agreed,” he recalls. The NBC brass wasn’t so sure, however, worrying that they might be too “urban.” But they were won over after seeing the band rehearse. “They can play with Jay Z and then Tony Bennett, and have it make perfect sense,” Fallon says, “and that’s what you need in a latenight band — that range.”

Arsenio Hall considers his band “my co-stars — plain and simple, which is why I hand-picked them.” “The Arsenio Hall Show,” which originally aired from 1989 to 1994, was revived in September, and the CBS production features new bandleader and drummer Robin DiMaggio.

“I’ve known Robin for over 20 years, and he used to play with Bowie,” Hall says, “and Stevie Wonder introduced me to (keyboardist and vocalist) Victoria Theodore, so you know she bad. All the guys are incredible musicians, and I know just how important it is for visiting stars to respect the band. So if Prince or Madonna stop by, it’s a band they’ll play with.”

Hall, who describes himself as “a music fanatic,” takes more than a passing interest in the band’s role.

“I wrote the theme song and the turnaround when I walk out on stage,” he says. “Early on, there was a budget conversation with the suggestion of using a DJ instead of a live band. Now that could maybe work for some people, but I told ’em that I’d pay for the band myself rather than do without.”

Hall’s show was always music-centric; Bill Clinton, donning a pair of sunglasses, crystalized a cultural moment when he wailed on the saxophone in 1992 with Hall’s house band the Posse. DiMaggio still leads the Posse, albeit one with all new members.

But while the music remains a constant in the shows’ mix of comedy and celebrity interviews, musical tastes have changed dramatically over the years. “It’s a whole different musical scene now, even from when I did my first show,” says Hall. “As for that old, big band sound — that’s gone forever.”

Allen’s eventual successor Johnny Carson presided for three decades over an old-school jazz big band, led by Doc Severinsen, with drum clinics staged by frequent guest Buddy Rich.

“We can still play jazz and back artists like George Benson, but we’ll also do hip-hop and country and back Ozzy Osbourne,” Escobedo says. “It’s a pretty versatile gig.”

When Carson finally retired in 1992, the big band was let go and respected sax player Branford Marsalis was hired to lead a much smaller ensemble for Jay Leno, followed by jazz guitarist Kevin Eubanks. And when Conan O’Brien (temporarily) replaced Leno, he brought with him his “Late Night” band, the Max Weinberg 7, whose leader was best known as Springsteen’s time keeper.

Of late, the game of musical chairs has picked up the pace even more. Eubanks returned to “The Tonight Show” briefly, followed by bandleader Rickey Minor. And when Fallon takes over the show in February, the Roots will follow him. “I can’t imagine doing the show without them,” he says.

Given today’s increasingly fragmented market and the uncertain future facing many talented musicians, a stable, regular gig on a late show — bandleader Paul Shaffer has been with David Letterman since 1982 — is often the envy of even successful working bands.

Case in point: the L.A.-based Nikhil Korula Band, highly versatile 12-year vets who’ve played Bonnaroo, Summerfest and opened for the Dave Matthews Band and John Mayer.

Singer-songwriter Korula, who describes their music as, “world groove rock,” says that “doing a show like Leno or Kimmel exposes so many people to your music. Some people say it’s too limiting creatively, but I think being a house band is a great gig.”

Adds Escobedo: “We’re all dads in the band now, so not having to go on the road and having a steady income is a real luxury for any musician.”