In the George Harrison film from which the term comes, the main character is obsessed with a woman he can see through a hole in their shared wall. In a literal sense, that wall is the wonderwall. But metaphorically, the wonderwall is the object of fascination itself (usually a person). This is the sense in which the term is used in the Oasis song. Yes, the song is about an imaginary friend coming to save him. But the constant thinking about that imaginary friend is what makes them his wonderwall.
So if you wanted a definition, I would say that a wonderwall is a person that one cannot stop thinking about (and by extension, any object of intense fascination or infatuation).