Two squares that
lie in the same column and have the same color will be called
a doublet. Since each column contains at least one doublet,
the $3 \times 7$ board contains at least seven doublets. By the
Pigeonhole Principle, at least four doublets are the same color, say, black. Now, each doublet determines a pair of rows. Since
there are more than three black doublets but only
$\binom{3}{2} = 3$ pairs
of rows, two black doublets determine the same pair of rows
(again by the Pigeonhole Principle). The four black squares
that comprise these two doublets are the corners of the desired
rectangle.
More generally:
Suppose that every square of an $m \times n$ chessboard is painted
with one of two colors (say black or white). A rectangle of the
chessboard that has all the four corners of the same color is
called a chromatic rectangle. We will call an $m \times n$ chessboard a
CR-board if every black and white coloring contains a chromatic
rectangle. A $m \times n$ chessboard colored with two colors is a CR-board if and
only if it contains a $3 \times 7$ or a $5 \times 5$ board.
There is also a sufficient condition for the existence of a chromatic rectangle:
Suppose that $N$ squares in a $m \times n$ board are colored black. Let $N = nq + r$, where $0 \le r < n$. If
\begin{align*}
r\binom{q+1}{2} + (n-r)\binom{q}{2} > \binom{m}{2}
\end{align*}
then there is a rectangle all of whose corners are black.