The story's set in Paris, that magical, glamorous city of lights where just about every other work of 19th century French literature is set.
So that's the where. When's the when? We'd say the 1880s or so, around the time Maupassant wrote it. Granted, we don't get many specific clues, not a lot of detail on clothing, or important people, places, or happenings of the time. But if the author doesn't do anything to suggest he's otherwise, it's usually a safe bet to assume he's writing in his own time.
One thing that's telling, though, is that Mathilde dreams of being rich, but doesn't seem to think a whole lot about being noble. If the story were set earlier, noble blood would have mattered more, and Mathilde probably would have thought about it just as much as money. At this point in time, however, money (plus a little bit of charm) practically makes nobility. Money's what enables you to pay for the "high life," and surround yourself with fancy, fabulous things. And the fancy, fabulous things that Mathilde fantasizes about – the oriental tapestries, "tall lamps of bronze," the "precious bric-a-brac" in "coquettish little rooms" – all hint at the fashions of the time, as does the intimate," small-party social life that she idolizes.
In fact, the importance Mathilde gives money, posh "comfort," and fancy, fashionable baubles makes her fit right in with the Paris of the late 19th century. That period was often called the "Belle Époque" (which you could translate as the "Lovely Age," or "Grand Years" – depending on how you understand it). It was a time of peace and technological innovation (electricity, for example). It was also a period of spectacular wealth, modish fashion, and what you might call "high consumerism." Going on expensive shopping sprees at the brand new, super-ritzy, block-sized department stores that had just opened up downtown was all the rage (Sacks Fifth Avenue-type shopping palaces were a new invention back then).
So if you're one of those folks who thinks a work of literature should capture the "spirit of the age" in which it was written, "The Necklace" works quite well.