And let me mention an even more elementary answer, expanding on Amitesh's hint.
Let $U$ be the punctured affine plane. Assuming that we have shown that there are no regular functions on $\mathbb{A}^2$ which vanish only at one point (I believe this follows from Krull's Hauptidealsatz), then it is clear that a regular function on $U$ is just the same thing as a regular function on $\mathbb{A}^2$. So its ring of regular functions is isomorphic to the ring of regular functions of $\mathbb{A}^2$.
Now consider the embedding $\Phi : U \hookrightarrow \mathbb{A}^2$. If $U$ were affine, then, by the equivalence of categories between $k\textbf{-Var}$ and (a certain full subcategory of) $k\textbf{-Alg}$, $\Phi$ is an isomorphism of varieties if and only if it induces an isomorphism of coordinate rings, and $\Phi$ does induce an isomorphism on each ring of regular functions. Yet $\Phi$ clearly cannot be an isomorphism as it is not surjective on points—a contradiction. So $U$ isn't affine.