All happy families are alike, every unhappy family is unhappy in its own way. (1.1.1)
Tolstoy asserts that there is a specific kind of happiness that families can achieve. The infinite variations from that happiness result in a special kind of unhappiness. It's almost as if he thinks there is a single recipe for happy families.
In those days Levin used often to be in the Shcherbatskys' house, and he was in love with the Shcherbatsky household. Strange as it may appear, it was with the household, the family, that Konstantin Levin was in love, especially with the feminine half of the household. Levin did not remember his own mother, and his only sister was older than he was, so that it was in the Shcherbatskys' house that he saw for the first time that inner life of an old, noble, cultivated, and honorable family of which he had been deprived by the death of his father and mother. All the members of that family, especially the feminine half, were pictured by him, as it were, wrapped about with a mysterious poetical veil, and he not only perceived no defects whatever in them, but under the poetical veil that shrouded them he assumed the existence of the loftiest sentiments and every possible perfection. Why it was the three young ladies had one day to speak French, and the next English; why it was that at certain hours they played by turns on the piano, the sounds of which were audible in their brother's room above, where the students used to work; why they were visited by those professors of French literature, of music, of drawing, of dancing; why at certain hours all the three young ladies, with Mademoiselle Linon, drove in the coach to the Tversky boulevard, dressed in their satin cloaks, Dolly in a long one, Natalia in a half-long one, and Kitty in one so short that her shapely legs in tightly-drawn red stockings were visible to all beholders; why it was they had to walk about the Tversky boulevard escorted by a footman with a gold cockade in his hat – all this and much more that was done in their mysterious world he did not understand, but he was sure that everything that was done there was very good, and he was in love precisely with the mystery of the proceedings. (1.6.2)
Levin falls in love with the Shcherbatsky family, in part because he never had a family. As an outsider, Levin seems to think that family is the key to happiness. And it's clear that Levin also sees women as the essential component to a happy family, so it's no surprise that he wants desperately to marry – and specifically to marry Kitty Shcherbatsky.
Marriage had never presented itself to him as a possibility. He not only disliked family life, but a family, and especially a husband was, in accordance with the views general in the bachelor world in which he lived, conceived as something alien, repellant, and, above all, ridiculous. (1.16.5)
Vronsky looks down on normal family life, which maybe explains why he opts for a love affair with a married woman. For a detailed discussion of Vronsky and family, check out his "Character Analysis."
After tea he went out into the hall to order his horses to be put in, and, when he came back, he found Darya Alexandrovna greatly disturbed, with a troubled face, and tears in her eyes. While Levin had been outside, an incident had occurred which had utterly shattered all the happiness she had been feeling that day, and her pride in her children. Grisha and Tanya had been fighting over a ball. Darya Alexandrovna, hearing a scream in the nursery, ran in and saw a terrible sight. Tanya was pulling Grisha's hair, while he, with a face hideous with rage, was beating her with his fists wherever he could get at her. Something snapped in Darya Alexandrovna's heart when she saw this. It was as if darkness had swooped down upon her life; she felt that these children of hers, that she was so proud of, were not merely most ordinary, but positively bad, ill-bred children, with coarse, brutal propensities – wicked children.
She could not talk or think of anything else, and she could not speak to Levin of her misery.
Levin saw she was unhappy and tried to comfort her, saying that it showed nothing bad, that all children fight; but, even as he said it, he was thinking in his heart: "No, I won't be artificial and talk French with my children; but my children won't be like that. All one has to do is not spoil children, not to distort their nature, and they'll be delightful. No, my children won't be like that." (3.10.49-51)
Motherhood for Dolly has its ups and downs. Since her life is so focused on her family, she's horrified when her children misbehave. Levin, for his part, is convinced that his family will certainly not behave in that way. He seems to be under the impression that raising children is easy.
Levin had been married three months. He was happy, but not at all in the way he had expected to be. At every step he found his former dreams disappointed, and new, unexpected surprises of happiness. He was happy; but on entering upon family life he saw at every step that it was utterly different from what he had imagined. At every step he experienced what a man would experience who, after admiring the smooth, happy course of a little boat on a lake, should get himself into that little boat. He saw that it was not all sitting still, floating smoothly; that one had to think too, not for an instant to forget where one was floating; and that there was water under one, and that one must row; and that his unaccustomed hands would be sore; and that it was only to look at it that was easy; but that doing it, though very delightful, was very difficult. (5.14.1)
Levin finally experiences real family life and finds out that it's nothing like his fantasy. Marriage in itself is not the solution to his existential angst.