It seems simplistic to say that “good” science fiction will pose a question, but I truly believe that. The greatest scifi books I have ever read has dealt with questions like “what would happen if…”
There is no requirement that scifi ask a question, but I think it helps.
So then, with that out of the way, how do you write good questions?
Oh it’s very easy to have your protagonist muse over the question while sipping coffee. But is that the best way? Maybe it’s best to make the readers pose the question themselves as a result of your writing?
I think the best questions in science fiction are asked by the author and answered by his or her work. That is how you write great science fiction.