First and foremost, Anna Karenina is a Russian novel. It's not just that the characters happen to be Russian. More than that, the characters we meet are interested in their Russian-ness, and they debate what it means to be Russian.
Most crucial is the novel's setting in late 19th century Russia. This was a time of incredible intellectual fervor and debate about what direction Russia should take in becoming a modern nation. For centuries, Russia had been a place that lagged behind its Western neighbors in sophistication and culture. By the late 19th century, Russia was hurrying to catch up and prove it could be as advanced as the rest of Europe. This sparked a huge debate over how much Russia should try to Europeanize itself and how much it needed to hang onto its own traditional values.
At the same time, Russia was also dealing with huge economic and political issues. While Western countries were beginning to democratize, Russia was still an empire run by an all-powerful Czar. Russia's wealth was concentrated in the hands of a few wealthy nobles, but the vast majority of Russians were peasants who had been using the same farming techniques for hundreds of years. There were plenty of people who thought this situation was bad news, but there were lots of conflicting opinions on what should be done. ("What Is To Be Done" was a popular name for political tracts, one of which was written by a guy you might have heard of, Vladimir Lenin.) Some radicals suggested a violent overthrow of the tsar and the nobles. Other reformers wanted to try to solve the problem by making Russia more productive agriculturally. Potential reformers often ran into trouble (as Levin does) trying to teach the peasants new ways to farm. Some intellectuals looked to Western democracies to provide examples for Russia's future; they argued that education and modernization were essential.
Others dreamed of embracing a new social life based on ancient (and perhaps fictitious) Russian communal villages. Add to the mix traditional Orthodox Christianity and new stirrings of atheism, and you have a time period that would prove to be literally explosive. Remember that the Russian Revolution came only a few decades after Tolstoy wrote Anna Karenina. This time period emerges clearly in the novel, because characters constantly discuss hot intellectual topics like industrialization, spirituality, agriculture, the peasantry, and the role of women.
Tolstoy illustrates the different facets of 19th century Russia through the different physical settings of the novel. Setting matters a lot in Anna Karenina. The lives of the characters – especially their moral lives – are affected by their surroundings. Levin only feels comfortable in the countryside, because the country embodies traditional Russian values like purity, hard work, and religiosity. Oblonsky is happiest in town, but when Levin stays in town for a long time he starts drinking, gambling and falling for women other than his wife. As soon as he heads back to the countryside , of course, Levin becomes a good guy again.
The two cities of the novel also each have their own character. Moscow is traditional, conservative, and "Old Russia"; Petersburg is fashionable and hedonistic. Petersburg represents the "New Russia" shaped by European influences – which can be both a good thing and a bad thing, but which Tolstoy often views as a bad thing.