Alan W. Pollack, our go-to guy for Beatles music analysis, has a lot to say about the song's melodic texture. "The music is certainly as mercurial and elusive as the imagery of the words, especially in terms of the constantly shifting key structure and the rhythmic alternation of 3/4 and 4/4 meters." The rest of his thoughts, alas, are too full of music theory jargon to bring in here (if, however, you're well-versed in music theory, click through and read on.)
The basic case-in-point is that the song jogs around between three different distantly related keys yet manages to maintain a coherent sound without jarring our ears. It starts out in A Major in the verses, merges into B-flat Major in the bridge, and rounds out in G Major in the chorus. Usually a song stays within one key, possibly two to provide a dramatic shift towards the end, but three is unusual. Not to mention the fact that a symphony of instruments do their part to back up the basic bass, guitar, and drums played by John, Paul, George, and Ringo. According to thebeatlesonline.com:
"The Beatles used several effects in the recording studio to create the dream-like, surrealistic atmosphere that surrounds Lucy In The Sky With Diamonds. First, Lennon's child-like, high-pitched voice was created by recording him at slow speed before playing the track back at normal speed... In addition, his microphone was put through a Leslie amplifier inside a Hammond organ (Beatles had used the same technique on Tomorrow Never Knows from 1966's Revolver). George Harrison played the Indian tambura on the song, an Indian, guitar-like instrument which makes a drone sound. Together with McCartney's delightful bass line and Ringo's timely use of cymbals it all sounded weird and wonderful at the same time. It was McCartney who played the song's distinctive opening passage on a Hammond organ (other sources claim it was a Lowry organ, but the two are very similar). The organ was taped with a special organ stop to create the celeste-like sound."
The whole song is musically designed to sound dreamlike and psychedelic. While we are totally used to this kind of vocal distortion today – just listen to the synthesized voices of Kanye West or Britney Spears if you want to know what we're talking about – in 1967 this technique was brand new. Back in the day, they made Lennon's voice high-pitched and childlike by using the exact same technique they used on Alvin & the Chipmunks, recording it slow then playing it back fast. This is totally appropriate for "Lucy," since both an acid trip and Lewis Carroll are capable of invoking surreal fantasies of childhood and worlds that only exist in our imaginations. Lennon's biography says, "Filtered through yet another of George Martin's electronic strainers, John's voice took on an almost childlike quality, as if the seven-year-old who had first followed Alice into the White Rabbit's burrow were speaking through him."