This is a great question, but it could be answered many different ways by readers. This is perhaps a sign of greatness in literature: its openness to interpretation.
Tolstoy uses as his epigraph a quote from scripture: "Vengeance is mine; I will repay." So at the start, even if readers have not been familiarized with the basic story, they know it will be a very grim one.
If the epigraph is our starting point, we can see that a principal theme is that people are accountable for their conduct. On the simplest level of interpretation, Anna has cheated on her husband and is punished for it. She moves in with Vronsky, her son is taken away from her, she is ostracized by society, and she finally commits suicide, feeling that Vronsky no longer loves her (though he never tells her so). In a more distant sense, Tolstoy's theme may partially be the victimization of women. Though Vronsky is shown in a depressed, uncomfortable position at the end of the story, none of the male characters suffer the same fate for doing the same things Anna has done. Levin, who is the most sympathetic character in the story, has had a life as a womanizer before settling down with Kitty, and he even gives her his diaries to read. These detail his past affairs, which horrify her. But neither Levin nor Vronsky are "punished" for their past as Anna is for hers. Nor is Vronsky's friend Yashvin, who is "not only not a man of moral principles; he was a man of immoral principles." Anna's brother Oblonsky and Vronsky's brother Alexander are also adept philanderers, and neither one suffers the same consequences as Anna. Whether Tolstoy simply notes this gender double-standard as a neutral observation or if it is meant as an explicit theme, we cannot know for sure.
A further theme is that life is always imperfect and unfulfilling and that those who accept this are the only ones who can be "happy." The marriage of Levin and Kitty is an illustration: Levin never finds complete fulfillment and even contemplates suicide in the midst of a marriage that seems as good as any union is likely to be. Anna, we are to understand, seeks too much. Instead of accepting the imperfections of the bumbling Karenin, she leaves him for an expected life of excitement with Vronsky. She is fulfilled, to a point, but the unhappiness that ultimately results is worse than anything that would have occurred if she had stuck it out and stayed with Karenin.