This question can be answered in two ways.
First, when it comes to setting from a temporal point of view, the story takes place during the time of the decline of Napoleon's empire. More precisely, the story starts in 1815 and it ends in 1844.
Second, when it comes to location, the story mostly takes place in Paris. Most of the major events of the book are in Paris, which make sense because the Count of Monte Cristo (Edmond) is reintroduced into society as a wealthy nobleman.
Other places are also important. Marseilles is where Edmond is from. This is his hometown, where his father was and died as well as where he fell in love with Mercedes. This is also where he was framed.
Rome, Greece, and Constantinople also play important roles. For example, Edmond emerged in Rome after nearly a decade (after his escape) and makes friends with Albert de Morcerf, who in turn introduced him to Parisian society.
The novel takes place in a number of settings, but most of the plot occurs in Marseilles, Chateau d'If, and Paris (France), Rome, the island of Monte Cristo, and Greece. See the link below for more information.
The setting is first Chateua d'f and then marsellies and paris
The novel starts at close to the the time Napoleon escaped from Elba in 1815. Remember Edmond Dantes unwittingly brings back a letter intended for Napoleons followers? With the help of the army Napoleon was restored to power breifly in what is commonly referred to as the "hundred days". His reign ended in June 1815 with the victory of the allied coalition at Waterloo. Napoleon abdicated and was exiled to the island of St.Helena. Our poor Edmond was in the dungeons of the prison d'If during all this and for the next fourteen years.