It makes sense, doesn't it? That's why, as a mystery writer, I've had to commit some pretty gruesome murders...oh wait, someone's at the door. Police? What do they want?
(nine hours later...Thank god for bail.)
So to put it another way, NO! No, you don't have to write what you know. I have never murdered anyone, or had my son kidnapped or dealt with a serial killer, or worked for MI5.
In fact, I highly doubt any of the science fiction writers out there have written about anything they've experienced personally. The more imaginative, the better.
However, that being said, it's vital as a writer to do research (I will blog on this subject tomorrow.) To be as accurate as you can, it's important to find out more information and we have a great tool for that...THE INTERNET.