In the UK, most towns have had a park since Victorian times. Between the wars, the park keepers would sometimes become over zealous about their immaculate grass and carefully planted gardens. They would put up signs saying “KEEP OFF THE GRASS”, which did kind of defeat the object of having a park in the first place.
Subsequently the sign and the meme has become almost universal.
I was a city kid and none of my neighbors had lawns. But the comedy meme still registered with me because we all had grumpy neighbors who hated kids.
I related more to the Beatles’ running line, “Hey Mister, can we have our ball back?” Any time we played stickball in the street or the schoolyard, inevitably, our Spaldeen (pink Spalding rubber ball) would go into some grouchy senior citizen’s yard. We’d have to beg for it back, or try to hop the fence and get it back before being caught.
So, I never heard “Get off my lawn.” But “Get the hell out of my yard?” Lotsa times.
It’s not really an admonishment to get off your property so much as it is not to trample the grass you’ve been meticulously caring for. At least that’s how it was used in my neighborhood.
Funny enough, I was able to find a song from 1960 called Get Off My Lawn, performed by Charles Nelson Reilly in a musical called “Parade” or “Jerry Herman’s Parade.” Jerry Herman is of Hello Dolly! and Mame fame, among others. Unfortunately, I can’t find the lyrics anywhere, to see in what sense the phrase is being used. (And, also, it does not appear to be on the original cast recording.)
Using Google Ngram, it appears to me that, although you can find isolated examples of “Get off my lawn” or “Get out of my yard” as far back as 1912 (as in kunilou’s example), it didn’t become a standard joke until about 1960.
I’m tickled by a recent variation, on another board – poster, a young guy, affecting an “old” persona: "I would wish politely to request that the junior citizens concerned, might kindly remove themselves from that portion of territory which will be called for the purposes of this issue, ‘my lawn’ ".
Sometime in the mid-70’s I saw a parody commercial (SNL perhaps?) of classic 60’s songs updated for the “hippie to yuppie” generation. The only two songs I remember were “Light My Cigar” and “Get Off My Lawn”.
A political variation that had a limited vogue in the UK in the 60s and 70s was “Get your tanks off my lawn” - I believe Harold Wilson said it to a union leader who was throwing his weight about in some Labour Party dispute .