Question: When you are writing your stories how do you decide where you are going to set it? Answer:
A lot depends on your individual creative process.
You may have a story idea occur to you for which the setting seems less important in the beginning, apart from a general sense of whether it should take place in a big city versus a small town or rural area.
Other times, a particular setting is the inspiration for the story and is wedded to it from the start. For instance, you may spend some time in a very unique and special neighbourhood or you read about a historic city, and suddenly ideas for characters and plot come to mind that could not possibly exist anywhere else.
(Well, sometimes you can transpose characters and stories from one milieu to another - that's how we get science fiction westerns or steampunk, but that's another story.)
Since you're asking the question, I'm assuming you have a story idea that did not arise from a particular setting.
In that case, you have to look for a setting that will inspire you - one that evokes the kind of feelings you associate with your story.
If you are writing high fantasy, you have the advantage of being able to design your own world and have its history reflect the themes you want in your story. If you want a contemporary setting, you can often create a fictitious place that resembles a real place you know (this gives you the liberty to change some of the details to suit your theme).
If you are writing historical or contemporary fiction, you will have
to do research to discover a setting that fits the themes you want to explore.
For instance, if you are writing a murder mystery, consider the difference between a body being found in a lonely shack in the woods versus a church picnic in a small town on a July morning. One evokes the sense of danger in being far from civilization, the other from the discovery that a safe, friendly place is not so safe and friendly after all.
You have to consider whether your story is suited to a setting that is confined (like a dessert island or a school) or open (like the world of jet setters or the vastness of outer space). Again, the feeling is different with each.
And, of course, sometimes you may choose a setting just because you are fascinated by a particular world. For instance, let's say you want to write a political drama, but you've always been fascinated by the world of professional museum curators... or air traffic controllers... or the South Asian sex trade. The use of a fresh setting can give your story a great sense of originality.
Of course, the easiest way to start is to consider settings you already know well because you have spent time in them - or settings similar to places you know well. They are easiest because you already know a lot of specific details that will give your story a feeling of authenticity.
Either way, you will have to know your setting very well by the time you start writing. Real settings must be researched in detail. Fictitious settings must be invented in detail. Authenticity comes from specificity.