Formal dances are a crucial part of the social scene in Pride and Prejudice. In such a straight-laced society, this was one of the few opportunities for men and women to get together (respectably, at least). Dancing is presented in the book as a kind of courtship ritual, the necessary prelude to a married relationship.
In Georgian England, if you wanted to enter into a respectable marriage—as just about everyone in Pride and Prejudice does—then it was considered essential to be able to dance. Men and women alike would spend hours learning the finer points of dance steps and dance etiquette. This would allow them to show themselves off to prospective marriage partners at formal dances, their dancing skills being widely seen as a physical embodiment of their character. It's no exaggeration to say that, at that time and in that society, the ability to dance was seen as an expression of a person's individual worth, and that's certainly the impression given by Jane Austen in Pride and Prejudice. For instance, the fact that the oily and unpleasant Mr. Collins is positively hopeless on the dance floor speaks volumes about his character.