I think Lennon was more creative and imaginative than McCartney. When McCartney wrote Hey, Jude he told Lennon the line "The movement you need is on your shoulder" was a placeholder and he was going to replace it. Lennon responded, "Why? It's the best line in the entire song." Lennon was right.
For songwriting, I tend to think of their strengths being (1) John creative, "artsy," whimsical at times, confessional, direct; (2) Paul is showman first, entertainer, ambitious with his creative side. Certainly each has/had plenty of "the other parts," but that's my interpretation. And when they collaborated, strengths of one often enhanced the other.
They also were extremely competitive, wanting to impress the other one (at least it was that way in the early stages, they sort of drifted more into their own directions later).
Not to mention it helps to be excellent at songcraft and voices blending (along w/ George's contributions there).