It is important to do research when you are writing on a topic that you aren't familiar with. Often times, writers make the mistake of creating unbelievable characters because they haven't done adequate research, or haven't experienced similiar cenarios their character may have been portrayed in. J.D. Salinger wanted to create a realistic teenage male character for Catcher in the Rye so he actually invited teenage boys to hang out at his house--once he was finished with his books, he never invited them back. He simply wanted to use them for research and to observe their habits and antics.
Doing research is absolutely crucial if you're writing any of the following things:
- Historical fiction
- A character in a culture/nation different from yours
- A character of a vastly different age/gender group than yours
- Specific time periods