It remains one of the Beatles’ most loved songs. Written mainly by Lennon, its message of tolerance became central to his legacy.