Pete Townshend's anthem may have been embraced broadly, but it was primarily local in its inspirations.
The immediate inspiration was an event that occurred outside his London home: the towing of his prized 1935 Packard Hearse. He explains, "One day I came back and it was gone. It turned out that [the Queen Mother] had it moved, because her husband had been buried in a similar vehicle and it reminded her of him. When I went to collect it, they wanted two hundred and fifty quid. I'd only paid thirty for it in the first place." (Source)
Townshend's broader inspiration was a distinctive youth culture that emerged in London in the late 1950s. Aggressively cosmopolitan, this culture fused European, American, and Caribbean influences to craft a distinctively modernist, or "mod," style and music. From Italy and France they borrowed tailored suits and pointed-toe shoes, from the U.S. they borrowed R&B, from the Caribbean they borrowed ska.
The mods' drug of choice—amphetamines—summed up their philosophy, which was a high speed pursuit of entertainment and experience. Marijuana was the anti-mod drug. And "rockers" were the anti-mod cultural alternative. Dressed in jeans and leather, they contemptuously viewed the mods as fancy-dressing dandies. The mods returned their contempt. Generally more urban, the mods saw the rockers as unsophisticated thugs.
For the most part, the conflicts between the two youth cultures were contained. But during the May Day Bank Holiday of 1964, mods and rockers clashed at several seaside resorts. The worst of these confrontations occurred at Brighton.
Pete Townshend, as a member of the London mod scene, later explained that the widespread discontent felt by these young people helped motivate him to write "My Generation" in 1965. Several years later, he drew upon the Brighton riots in writing his second rock opera, Quadrophenia.