The song originated with Lennon, and while Paul McCartney contributed to the final version, he and Lennon later disagreed over the extent of his contributions (specifically the melody). George Martin contributed the instrumental bridge. It is ranked 23rd on Rolling Stone’s “The 500 Greatest Songs of All Time” as well as fifth on their list of the Beatles’ 100 Greatest Songs.
According to Lennon, the song’s origins can be found when the English journalist Kenneth Allsop made a remark that Lennon should write songs about his childhood. Afterwards, Lennon wrote a song in the form of a long poem reminiscing on his childhood years. The original version of the lyrics was based on a bus route he used to take in Liverpool, naming various sites seen along the way, including Penny Lane and Strawberry Field. Those original lyrics are on display at The British Museum.
Original lyrics to John Lennon’s “In My Life”
However, Lennon found it to be “ridiculous”, calling it “the most boring sort of ‘What I Did On My Holidays Bus Trip’ song”; he reworked the words, replacing the specific memories with a generalised meditation on his past. “Very few lines” of the original version remained in the finished song. According to Lennon’s friend and biographer Peter Shotton, the lines “Some [friends] are dead and some are living / In my life I’ve loved them all” referred to Stuart Sutcliffe (who died in 1962) and to Shotton. (source Wikipedia)