Mystery stories have been a very popular genre for almost 150 years. Their unique appeal lies in their ability to make the reader feel both clever and baffled by the story.
This also makes it a tricky genre to write, because the balance of clues and red herrings needs to leave the reader satisfied that there was sufficient information for him to solve the mystery, but that the writer still managed to surprise him.
Out of all the genres, mysteries probably require the most detailed planning (or otherwise severe rewriting) in order to incorporate the necessary clues for solving the mystery.
Private detectives
The private detective setup (individual or team) is probably the most commonly used vehicle for the mystery story because the plot can revolve around a greater freedom for using creative methods to solve the mystery, and also the differing levels of access to information than the police do. Sometimes not having the same access to information is a plot obstacle for the detective, and other times the detective has different, possibly clandestine, opportunities for gaining handy clues that might pass a police department by.
Amateur detectives
Amateur detectives are also popular because the reader can identify with an ordinary civilian with the right levels of curiosity and intelligence to solve a mystery. Who hasn’t thought they might be clever enough to be the person who puts the correct two and two together to come up with the solution? Or at least be the witness who managed to remember important details that lead to an arrest?
Police procedurals and forensic mysteries
Detailed police work and technical forensic investigation are becoming increasingly popular (think of the CSI franchise) because readers are becoming more informed and more interested in the scientific and technical details that these include.
The focus is on solving the impossible mystery using complex analysis of the evidence. Because of the knowledge and research required, these mysteries are open to error (and therefore possible ridicule) unless the writer has personal experience working in a police or forensic environment, or has a close contact to interview extensively and use as a fact checker.
Historical mysteries
In order to curb the requirements for scientific solutions, some writers choose to set their mystery in the past, where deductive reasoning and observation skills were the necessary tools for solving crimes. Detectives like Sherlock Holmes and Hercules Poirot remain the inspiration for old style mysteries using only “the little grey cells”.
Read my review of Writing Mysteries : A Handbook by the Mystery Writers of America.
For help with your mystery writing, try
How to Write Killer Fiction : The Funhouse of Mystery & the Roller Coaster of Suspense by Carolyn Wheat
The Weekend Novelist Writes A Mystery by Robert J. Ray

