The phrase "Anyone for tennis?" (also given as "Tennis, anyone?") is an English language idiom primarily of the 20th century. The phrase is used to invoke a stereotype of shallow, leisured, upper-class toffs (tennis was, particularly before the widespread advent of public courts in the later 20th century, seen as a posh game for the rich, with courts popular at country clubs and private estates). It's a stereotypical entrance or exit line given to a young man of this class in a superficial drawing-room comedy.

Usage
A close paraphase of the saying, was used in George Bernard Shaw's 1914 drawing-room comedy Misalliance, in which Johnny Tarleton asks "Anybody on for a game of tennis?" (An 1891 story in the satirical magazine Punch put a generally similar notion in the mouth of a similar type of character: "I’m going to see if there’s anyone on the tennis-court, and get a game if I can. Ta-ta!".)

"Anyone for tennis?" is particularly associated with the early career of Hollywood star Humphrey Bogart, and he is cited as the first person to use the phrase on stage. At the start of his career, in the 1920s and early 1930s, Bogart appeared in many Broadway plays in what Jeffrey Meyers characterized as "charming and fatuous roles – in [one of] which he is supposed to have said 'Tennis, anyone?'".

If Bogart ever did speak the line, it would have presumably been in the 1925 play Hell's Bells, set at the Tanglewood Lodge in New Dauville, Connecticut. Bogart claimed that his line in the play was "It's forty-love outside. Anyone care to watch?", and that indeed is what is printed in the script. However, according to Darwin Porter, director John Hayden crossed out that line and replaced it with "Tennis anyone?" before opening night. And several observers have asserted that he did say it, reportedly including Louella Parsons and Richard Watts Jr. Erskine Johnson, in a 1948 interview, reports Bogart as saying "I used to play juveniles on Broadway and came bouncing into drawing rooms with a tennis racket under my arm and the line: 'Tennis anybody?' It was a stage trick to get some of the characters off the set so the plot could continue." But Bogart's usual stance was denial of using that precise phrase ("The lines I had were corny enough, but I swear to you, never once did I have to say 'Tennis, anyone?'"), although averring that it did characterize generally some of his early  roles.

The phrase continued to drift through media in the 20th century and, to a diminished extent, into the 21st, often at random or just because tennis generally is the subject, rather than specifically to invoke or mock vapid toffs. It appears in the lyric of the "Beautiful Girl Montage" in the classic 1952 musical movie Singin' in the Rain, in the Daffy Duck cartoons Rabbit Fire, Drip-Along Daffy and The Ducksters (1950-1951),, and in the lyric and title of the 1968 song "Anyone for Tennis" by the British rock band Cream, which was the theme song of the film The Savage Seven. William Holden's shallow rich playboy character jokes "tennis, anyone?" when flirting with Joan Vohs's in the 1954 film Sabrina (in which Bogart plays another character). The television series Anyone for Tennyson? (1976–1978) riffs on the name, as does the 1981 stage play Anyone for Denis? "Anyone for Tennis" is the title of the B-side instrumental for Men at Work's 1981 single Who Can It Be Now?.

The phrase also occurs in Monty Python's spoof sketch Sam Peckinpah's "Salad Days".

References 

English phrases
Tennis culture
Quotations from literature
Metaphors referring to sport