In writing, as in much of life, it is important to have at least a basic knowledge of what you are talking about.
Journalists must interview subjects and research the background of a story. Non-fiction writers need to thoroughly examine their topic's history, influences, major players, current trends.
Even fiction writers need to understand what their character experiences, whether it be a thorough knowledge of the city they live in or the job they possess. A novel set in New York will look and sound different from a novel set in Moscow. An ice cream truck driver has a different set of experiences and industry lingo from an accountant. If the writer is not intimately familiar with such details, s/he should research, ask questions and acquire the necessary knowledge.
Knowledge makes a story believable.
One friend of mine wrote her novel set in a town in England, despite never having set foot in the town. How did she do it? Google Maps street view. Upon finishing the novel, she celebrated with a visit to the town and found a couple of alterations still needed to be made to be realistic to the town's design, but her research gave her a step up in bringing the town to life.
Your first draft may not require heavy research. You may be the type of writer who just goes for it, lets your fingers do the story-telling and send your brain in to edit later. That is fine. You can get the story out and go back to legitimize the details later. Just make sure you get the research done before you go so far as to submit a query.
The lovely thing about research and acquiring knowledge is that even when you don't have a story in your mind or on paper, the simple act of researching something that you are interested in can spur a story or a character.
Writers are lucky people in that way! We can spend our day as chameleons, all in the name of research. Interested in candle making? Take a class or visit an artisan! Want to know about weather patterns in the South Pacific? Google it! Need to reference a famous artist's work? Go to the museum! Need to know about sailing? Find the blog of an around the world sailing enthusiast.
Absorb everything around you, and seek out information. Ask people you meet about their lives and what they care about. It will help your work.
Today, I encourage you to take the day off writing and do some research instead.
writercize: Pick a topic that interests you, but you do not know much about, and research it.
If you are currently working on a novel or non-fiction work, look for a way to re-energize it with additional knowledge on the subject.
One word to the wise - approach your research, particularly that on the internet, with a grain of salt. If something doesn't make sense, ask yourself why and keep looking.
Good luck, and enjoy learning!