According to the Beatles, one day in 1967, Lennon's son Julian came home from nursery school with a finger painting that he said was of his classmate, four-year-old named Lucy O'Donnell. Showing the artwork to his father, young Julian described the picture as "Lucy - in the sky with diamonds".
Julian remembers: "I don't know why I called it that or why it stood out from all my other drawings but I obviously had an affection for Lucy at that age. I used to show dad everything I'd built or painted at school and this one sparked off the idea for a song about 'Lucy in the sky with diamonds'."
John Lennon liked the phrase so much that he eventually wrote the song. In addition to the inspiration from his son's artwork, Lennon also drew heavily from a childhood inspiration of his own, Lewis Carroll - the Wool and Water chapter from Through the Looking-Glass was a particular inspiration. Lennon had always loved Carroll's work, which was always obvious in his lyrics and his two books, In His Own Write and A Spaniard In The Works.
Some have suggested that the song was actually about Lennon's drug use, pointing out that the initials of the title are "LSD". Lennon and the Beatles, who were always very upfront about their drug use, deny that the song had anything to do with that.
Interestingly enough, the song was also the inspiration for the naming of an important anthropological find. On November 30, 1974, Donald Johanson and Tom Gray discovered the skeleton of a 3.18 million year old female hominid in the Afar Triangle of Ethiopia. They named it "Lucy".