The marriage theorem, also known as Hall's marriage theorem, provides a necessary and sufficient condition for a perfect matching in bipartite graphs. It states that a perfect matching exists if and only if for every subset of one partition, the number of neighbors is at least as large as the subset itself.