The simplicity of the lyrics and the music make it an ideal lost-love song. Remember, at that time, rock music was young enough that all the "obvious" subjects - love, love lost, breakups, etc - were still fertile fields for songwriting. You could still write a simple song with simple emotions and do something distinctive, because no one had come before you.
It's similar to the reason that Romeo and Juliet is the classic tragic love story - Shakespeare said it all, not only because he was a genius, but because English poetry and plays didn't have a long history at that point.
I like Yesterday and I think if McCartney wrote it today it would still be a good song. But it wouldn't attain the same level of fame.