Many authors have written on the subject, and I would wish to share my personal feelings.
Science Fiction is an interesting proposition. It is a hard genre to master and many people are often confused by what is and is not science fiction. Surely Anne Rice's "Vampire Chronicles" are not science fiction. They are fantasy. While no one would debate that Arthur C. Clarke's "2001 a Space Odyssey" is Firmly rooted in the realm of Science Fiction. So it would seem that one the surface that Spaceships and astronauts ostensibly make a Science Fiction Story, while Vampires, Werewolves, and Ghosts are firmly planted in the realm of Fantasy, but is this really the case.
Let us look at the Vampires in Anne Rice's Novels. These are truly Fantasy Creatures. They reproduce by magical means, there is no scientific explanation for them, nor is there a call for science to explain them. It is enough that they are damned, and forces to be undead. However, there are Vampires in fiction that start to blur the lines. In White Wolf Fiction, Vampires, or Kindred, as they are called, do have magical roots, but there are entities that strive to define their condition through scientific means, and locate the source of their "Curse". While the fictions of Palladium's "RIFTS" Universe states that Vampires have no connection to the magical at all, they are actually extradimentional parasites, Aliens on Earth. Even in the Blade universe set up through the films Vampirism can be inoculated against, and even reversed through scientific means. So clearly just being a Vampire does not mean the story is not Science Fiction.
But then there is the flip side of this argument. If Vampires cannot always be trusted to be the denizens of Fantasy Stories, and sometimes wind up in Science Fiction, can all Science Fiction Props always be counted on to stay firmly in the Science Fiction genre? Consider the Space Ship. Surely any time you see a space ship it MUST be a Science Fiction Story. I mean 2001; arguably the best science fiction film of all time has space ships, Alien, Star Trek. Starship Troopers even has a space ship in its name! Nothing could be more venerable in the science fiction genre than the space ship, except of course, perhaps, the robot. Or course there are space ships in fantasy stories. The Star Wars universe uses space ships yet the core of its story has always been a story about heroic magical knights sent to protect the galaxy from the ravages of evil wizards. Almost sounds like the Hobbit in Space doesn't it? So we have seen that Fantasy Characters cannot always be trusted to stay in their fantasy stories, and sometimes wizards fly starfighters, so if we can't trust the characters or the props to tell us what kind of story it is, what can we trust?
And there in lies the heart of science fiction, the question. What if? What if robots ran the world? What if you could travel through time? What if Humans discovered and Alien Artifact on the moon and it sent a screeching radio signal towards Jupiter ((Saturn)), and then on the way there the Computer went crazy and killed everyone? What if? This is the key question in any science fiction story. This is motivation behind which the story is driven. What if, the question that the story must answer by the end. That is what tells you that a story is Science Fiction. It is integral to the story. If the question is removed there is no story. Would there be a story to Close Encounters if the question "What if Aliens are real, and they have decided to make contact with Earth?" was removed? No. So the question is at the center of science fiction.
Now I know some will say that there are fantasy stories that ask what if as well, such as "What if Vampires were real?” Surely this is a what if question, and we must go back to the heart of science fiction, the science. What if Vampires are Real is a valid enough question, but unless their existence is explained by science there are in the realm of fantasy. So you could write a story that was science fiction with a question of "What if Vampires are real, and they are Aliens from Another Dimension?" and that would be science fiction. Where as "what if Vampires are the Descendants of the Biblical Cain whom God Cursed?" There is no Science in that and no Science fiction.
Now from this definition that Science Fiction must have at it's core a "What If?" question, and all things must be defined by Science, strange things begin to happen. If you accept this definition, things that seemed to be Science Fiction become fantasy, such as the Case with Star Wars, and things that seemed to be Fantasy become Science Fiction, such as RIFTS Vampires. But the Strangest thing of all is that stories that seem to be Science Fiction become nothing at all other than Dramatic Fiction. So perhaps there is a bit more to the story.
Take for instance the film Wing Commander, perhaps not a great work of Science Fiction but surely it is Science Fiction nonetheless, right? It has a what if question, what if Aliens exist and we are at war with them. Everything is explained with science, they are aliens and not mythical magical creatures, and special abilities in humans are passed by genetics, but do the Aliens have to be aliens? Could the same story be told if the characters were one a World War 2 Aircraft Carrier, or Submarine, and the Aliens were Germans or Japanese? I believe so. As a matter of fact it did seem that some of the scenes in Wing Commander were lifted straight from Das Boot or Run Silent Run Deep ((such as the sitting in the crater scene as the Kilrathi drop Space Depth Charges on the TCS Tiger Claw)). And there in lies the secret of good science fiction. It must be a question that can only be answered by the genre.
So I believe that to be Science Fiction, you must have at the core, a question, a what if question. All the Answers must be from Science, and you should not be able to tell the story without the genre.