We cannot know more than the author himself tells us, but the story first appeared in a Parisian newspaper (Le Gaulois on February 17, 1884) and had instant success. Could it be presumed, then, that "gay Paris," the City of Lights, would be the most appropriate setting for such a tale?
As for its inspiration, here is an interesting sidenote:
Certain connections may be made between ‘‘The Necklace’’ and the novel Madame Bovary, written by Maupassant's mentor and friend, Gustave Flaubert. Both stories feature a young, beautiful woman in a social situation that she finds distasteful. Like Madame Bovary, Mathilde Loisel attempts to escape her social station in life, but her scheming actions ultimately doom her.
See the enote reference below concerning the Guy de Maupassant's life and influences over his works.