Let the degree of every node be $d$ (and since the graph has at least one edge, $d>0$). Then the number of edges associated with nodes in $U$ is $|U|d$, and the number of edges associated with nodes in $W$ is $|W|d$. Every edge in the bipartite graph connects a node in $U$ with a node in $W$, thus the total number of edges associated with the two parts is the same.
Thus $|U|d = |W|d$ and $|U| = |W|$