Do you think it's ok to have a rhetorical question as a first sentence of a novel?
In my opinion, everything is possible. I do guess that the perspective of the story is important. Is it a third-person-narrator? In that case, it might come across as lecturing/telling ... and kill any suspense or sense of engagement.
It would work very different with a first person perspective, when the reader can identify with the character. Especially if it's a question he/she is curious about.
The good thing in either case: If I pick up your book, I will know by looking at that first sentence alone, whether it's the book for me.
No, there's nothing wrong with starting with a question but the question you've used here doesn't really spark my interest. What's your second line?
Maybe if you used something that could be considered 'wrong' in the question it would grab the reader more. I don't know your story but just to give you an example: "Was it wrong to talk to strange men in the subway?" or "Was it wrong to want your best friend to fail miserably?"
I hadn't thought of that. Good point. As Georgina notes below, I'm trying to establish that the MC is lonely. So the first two lines read "Was it wrong to want someone to talk to? At first it hadn't seemed like too much for Eleanor to expect from her new school." I will mull it over some more.
Not wrong in principle, but not necessarily good in practice. I find "Was it wrong to want someone to talk to?" uninteresting because the correct answer is so obvious. Julie highlights nicely the possibility of building conflict, drama or intrigue into a short rhetorical question.
Actually she gives two variations. Her first example implies that the POV character has already done something inadvisable. Another example might be "Was it wrong for Paul to poison little sister's hamster?" - implying Paul has committed, or is planning, this crime.
The second example works by implying that the character desires something that most people would judge wrong: wanting a friend to fail. There's a built-in contradiction - what sort of friendship is that?