In the early days he and Paul wrote head to head and many of the songs from that time are a true synthesis of two minds. An early example is "From Me To You", mostly written in a bus on the road between York and Shrewsbury, February 28, 1963.
Later on, though each would often contribute sections to the other's song, their writing diverged. Even though Lennon came from similar rock and roll roots to Paul (though in the latter's case there was more influence of pre-rock and roll music via his father), and reverted to them in the 70s after the break-up of the Beatles, there was a remarkable evolution in the 60s that culminated in three extraordinary songs that have no real equivalents before or since. These three songs begin with "Strawberry Fields Forever" released as a single in February 1967 and largely composed in November 1966. Here is a very early 'draft' recorded by Lennon at his home in Weybridge. As you can hear, early on there was just a suggestion of country in the guitar part.
Much of the evolution of the song took place in the studio where it was 'orchestrated' with a great variety of effects including a recording of a high-hat played back in reverse. The Wikipedia article gives a fair idea of the recording process, which took forty-five hours! Compare this with the recording of their first LP, Please Please Me which took a mere ten hours for all fourteen songs. An early indication of the power of this recording was the fact that it seems to have stopped other groups in their tracks with some saying "now what the **** are we going to do?" and caused Brian Wilson to simply shelve the new Beach Boys album. Here is the final version, the melding together of two very different takes. The splice occurs at the one minute mark. This is the original film made to accompany the song (the predecessor to today's music videos), but I'm not sure it adds anything, so feel free to ignore it.
What an extraordinary distance this is from the first drafts! Everyone makes a big contribution to the fleshing out of the song. Paul on the mellotron that begins the song, George on the Indian harp and great nine-note guitar solo at 2:58. Ringo's drumming is amazing all the way through.
The next song in what I am calling the Lennon 'Trilogy' came soon after and was used to end the LP Sgt. Pepper's Lonely Hearts Club Band. One of just a couple of examples of popular music discussed at some length in Taruskin's volume Music in the Late Twentieth Century from the Oxford history, the song is "A Day in the Life". He describes the techniques used here as well as in "Strawberry Fields" and the earlier "Tomorrow Never Knows" as
virtually the whole panoply of musique concrete devices pioneered in the studios of Paris, New York, and Cologne during the previous decade. ... In a sense, the Beatles were no longer writing songs. Like some of the avant-garde icons of the day, they were creating collages--finished artworks, artifacts on tape that could not be adequately reproduced in other media.The difference between the work of the avant-garde and the Beatles is, significantly, on the semantic level. The Beatles were engaging in social criticism and, especially in the case of Lennon, explorations of his inner life with an immediacy and frankness that was rare in popular music, which tended to the stereotypical. Nothing here of that, just the individual expression of Lennon, aided in its orchestration by the other Beatles, George Martin and the technical wizards in the control room. Again, Wikipedia has a pretty good article on the song. The middle section, "Woke up, got out of bed" was written by Paul. Here is "A Day in the Life":
That enormous orchestral glissando was recorded by forty orchestral musicians hired just for the occasion. One of the earliest admirers of this music was the fine American art-song composer Ned Rorem who saw in it a resurgence of genuine musical creativity and a renewal of pleasure. The last song in what I am calling Lennon's trilogy was released on the LP Magical Mystery Tour which was the result of a not-very-successful film the Beatles made intended to be shown on BBC television around Christmas 1967. But as Paul has said in an interview, it is the only film anywhere that has a performance of "I Am the Walrus" on it, so there! Here is "I Am the Walrus" which combines all the previous techniques with lyrics that perhaps owe something to James Joyce:
You may want to listen to this song without watching the video as well. From many years of practice, every time the Beatles were in front of a camera they tended to cut capers and fool around. But the music is very much not frivolous the way the film is. In the deep structure of the song there is a blending of minor mode, the Dorian mode as well as the whole-tone scale. The ambiguity in the harmony matches that of the lyrics.
After this trilogy of extraordinary songs, prepared by "Tomorrow Never Knows", John returned to a more conventional kind of writing in the White Album and Abby Road.