Don't underestimate setting as a valuable part of your mystery and serve to set the tone for the book. Some of my favorite reads have placed murderers on virtually-inaccessible islands, in lighthouses, in manor houses during snowstorms, and gritty metropolises.
Cozy mysteries usually will pick a tranquil setting for the murder, and have the murder make a major impact on the community. Whether the setting is a village in England or a small town in the American South, the reader feels the urge to solve the mystery and return the community to its former idyll status.
An isolated setting can create suspense for your readers. If there's a killer knocking out characters one by one, it can really heighten the urgency of solving the case. Agatha Christie demonstrated this beautifully in And Then There Were None.
Thrillers work well in many settings, but my favorites are set in cities like New York, London, or Las Vegas. The glitter of the big cities as backdrops can lend an up-all-night grittiness to the storyline.
Foreign Settings: You can make your reader an armchair traveler by placing your mystery in an exotic or foreign setting. What is exotic depends on the reader: I recently read a series of books set in Quebec, Canada and it provided a true escape through its pages. I've also read books set in Egypt, Greece, and various European countries. As long as the setting doesn't distract from the plot, it can really help to set the tone of the novel. Maybe your protagonist is in a country where they don't speak the language (or very well.) That can also serve to add more tension to the mystery.