I think this proclamation is often misunderstood, certainly in this form. A better way to put it, I feel, is ‘Use what you know.’
Obviously if you know a lot about the subject that you're writing about then you will bring an authenticity to it. Your words will carry authority. The confidence you feel in the words you put on the page will transfer to the reader. One of the biggest issues for aspiring writers is feeling their story is going to be doubted. People will say, ‘You said she was going to a cool party. I wouldn’t want to go to a party like the one you’ve described. How can you think this is cool?’
This kind of insecurity is at the root of a lot of the vague, detail withholding, coy writing at the start of stories. If I don’t say exactly what I mean, no one can judge me. I may not have proved I’m right, but nobody can prove I’m wrong.
One of the ways to get round this 'retreat into the comfortably obscure' is to write what you know to be true. I went to a party like this, it was damn cool, and I don’t care who thinks otherwise. That confidence from experience can get you over that initial hurdle of self-doubt.
Later, when you’ve experienced the range of responses a piece of work can get, you will be more than able to bluff and fake your way through it. Not to fake the writing, but to fake the confidence needed to answer critics or justify your choices.
But what do you know? Especially when you’re young and your life experience is school, family and a part-time job? In that position the ‘write what you know’ edict can feel like a kind of put down. You haven't done anything, you don't know anything, your writing isn’t worth anything. But every experience is a rich vein that produces different gems for different people.
Let's say the only job you ever had was working as a waiter in a restaurant. You now have knowledge of what it's like a behind-the-scenes of the service industry. 'Write what you know' would suggest that you can now write about restaurants. Of course, you may not be that interested in writing restaurant fiction, but you could use a cafe as the background for a story. Or you could have a minor character in a story work as a waiter. All of these different approaches would benefit from your firsthand knowledge. Any writer could probably come up with a similarly believable representation, but your story would have a greater feel of authenticity.
It should be noted that what you bring needs to be more than the universally accepted view of restaurants that people get from books and films and TV. You need to have an understanding of what it's really like and show aspects people won’t be aware of, and as long as you are an observational person that shouldn’t be too difficult.
So, write what you know, you know restaurants, you should write about restaurants, right? Sure, but you know a lot more than just how a restaurant works from working at a restaurant. You know how people work, how different dynamics operate, has status affects things, how personalities clash or gel. There's a whole gamut of behaviour you can observe, and then apply to almost any other situation whether onboard a starship or in the land of the faeries. Use what you know.
There are some things which are so specific that even though you can improvise, it will be fairly obvious that that's what you're doing. War, prison, politics — if you try to bluff your way through these sorts of things, even if you set it in another reality, people will smell something fishy.
Sometimes a great imagination and large amounts of conviction can sell something that is completely bogus. Other times research can provide the voice of authority that makes it believable. But ultimately reading something by somebody who isn't a very good writer but who has, for example, actually been to prison will by and large blow anything else out of the water. That’s the power of knowing things.
That doesn't mean you have to go to prison to write about prison, any more than you need to be a pregnant woman to write about giving birth, but you will be at a great disadvantage and need to find an approach that is convincing both for yourself and for your readers. The further you get from your personal experience, not in mechanical, physical terms, but in emotional terms, the harder it is to be convincing.
Just because you create a whole world from the ground up with no relation to the real world, not even populated by humans, people will still judge its authenticity. If the inhabitants love and hate and follow leaders and betray friends, those are all things we recognise. And if you base those relationships on other stories and generalities it won’t ring true. You have to call on the feelings you have experienced yourself. To give the story a unique voice and perspective you have to use something from your personal experience. You have to write what you know.