Jiri's answer gives the intuitive explanation. Formally, the fact that an optimal solution lies at an extreme point is a consequence of the representation theorem for polyhedra and the fact that the feasible region of a linear program is a polyhedron.
The representation theorem says that a polyhedron is the convex sum of its vertices plus the nonnegative linear combination of its extreme directions. More formally, if $S$ is a polyhedron, $\{{\bf v}_1, {\bf v}_2, \ldots, {\bf v}_k\}$ is the set of extreme points of $S$, and $\{{\bf d}_1, {\bf d}_2, \ldots, {\bf d}_m\}$ is the set of extreme directions of $S$ then ${\bf x} \in S$ if and only if ${\bf x} = \sum_{i=1}^k \alpha_i {\bf v}_i + \sum_{i=1}^m \beta_i {\bf d}_i$, $\sum_{i=1}^k \alpha_i = 1$ and $\alpha_i, \beta_i \geq 0$.
Then we have
Theorem: If $S$ is the feasible region of some linear program with objective function $z = {\bf c}^T {\bf x}$ then 1) $z$ attains its optimal value at some vertex of $S$, 2) the linear program is infeasible, or 3) the linear program is unbounded.
Proof: First, assume, without loss of generality, that the LP wants to maximize $z$. If the LP is infeasible, then $S$ is empty. Otherwise, there is at least one point ${\bf x} \in S$. If $S$ has an unbounded extreme direction ${\bf d}_i$ such that ${\bf c}^T {\bf d}_i > 0$, then the LP is unbounded, as we can make the value of ${\bf c}^T \left(\sum_{i=1}^k \alpha_i {\bf v}_i + \beta_i {\bf d}_i\right)$ as large as we wish by increasing $\beta_i$. Assume, then, that ${\bf c}^T {\bf d}_i \leq 0$ for each $i$. Let ${\bf v}^*$ be the vertex with the largest objective function value. Then, for ${\bf x} \in S$, $${\bf c}^T {\bf x} = {\bf c}^T \left(\sum_{i=1}^k \alpha_i {\bf v}_i + \sum_{i=1}^m \beta_i {\bf d}_i \right) = \sum_{i=1}^k \alpha_i ({\bf c}^T {\bf v}_i) + \sum_{i=1}^m \beta_i ({\bf c}^T {\bf d}_i) \leq \sum_{i=1}^k \alpha_i ({\bf c}^T {\bf v}^*) = {\bf c}^T {\bf v}^*.$$ Thus $z$ must attain its optimal value at ${\bf v}^*$.