“Yesterday” was, in effect, the first solo record from a Beatle. Paul McCartney famously wrote the song’s melody while asleep, hearing it in a dream. He held onto it for weeks, convinced that he’d been thinking of some nagging previously existing melody. He sang it for people, asking them whether they knew what song it was. Nobody knew, so McCartney finally decided, rightly, that it was his. (Not that the Beatles were ever that shy about swiping musical ideas.)
McCartney kept tinkering with “Yesterday” on the set of the Beatles’ movie Help!, reportedly aggravating both director Richard Lester, who threatened to take away his piano, and the rest of the band. He kept working on the words, too. For a while, the song’s working title, as a sort of private in-joke, was “Scrambled Eggs.” When McCartney did figure it out, when he recorded it, he was the only Beatle to do so.
Source: Tom Breihan/stereogum.com