Is there a functorial proof that Eilenberg-MacLane spaces are unique up to homotopy equivalence? Let $(G, n)$ be a pair where $G$ is an abelian group and $n \in \mathbb{N}$. Recall that an Eilenberg-MacLane space is a connected CW complex $X$ such that $\pi_r(X) = G$ if $r=n$ and $0$ otherwise. An Eilenberg-MacLane space is unique up to homotopy equivalence. A direct argument is given in Hatcher's book based on the Whitehead theorem (that a weak equivalence of CW complexes is a homotopy equivalence): one shows that there is always an Eilenberg-MacLane space of a given form (that starts with a wedge of $r$-spheres and then goes up). Then, one explicitly checks that given any Eilenberg-MacLane space, one can define a map from this one into the other one which induces an isomorphism on the homotopy group in dimension $n$, though. This relies on a particular construction of the Eilenberg-MacLane space, though.
Is there a more functorial way of seeing this?
One half of an approach is the following. We know that the Eilenberg-MacLane spaces represent the cohomology functors (with coefficients in $G$) on $CW_*$, the homotopy category of pointed CW complexes. This implies uniqueness.
But I don't think this is logically correct given the above constraint. Namely, the fact that any Eilenberg-MacLane space represents the cohomology functor relies, I think, on the fact that any two are homotopy equivalent. Namely, the proof I know of this fits the various $\{ K(G,n) \}$  into an $\Omega$-spectrum and then argues that they represent a cohomology theory which satisfies the dimension axiom, so is singular cohomology with coefficients. I don't see how it is obvious that any $K(G,n)$ can be fit into an $\Omega$-spectrum, though, without using the homotopy equivalence above.
 A: You can construct $K(G,n)$ functorially as the geometric realization of the simplicial set whose set of $k$-simplices is the collection of closed $G$-valued degree $n$ cochains on $\Delta^k$.
Example: $K(G,1)$.
{ closed $G$-valued $1$-cochains on $\Delta^0$ } = $ \{ * \} $.
{ closed $G$-valued $1$-cochains on $\Delta^1$ } = $G$.
{ closed $G$-valued $1$-cochains on $\Delta^2$ } = $G^2$.
...
Example: $K(A,2)$.
{ closed $A$-valued $2$-cochains on $\Delta^0$ } = $ \{ * \} $.
{ closed $A$-valued $2$-cochains on $\Delta^1$ } = $ \{ * \}$.
{ closed $A$-valued $2$-cochains on $\Delta^2$ } = $A$.
{ closed $A$-valued $2$-cochains on $\Delta^3$ } = $A^3$.
...
A: If you accept the Whitehead theorem, then simple obstruction theory (without cohomology) determines the homotopy type of spaces with homotopy groups in only one dimension.  That is, 
you can easily show that if the only nonzero homotopy group of the CW complex $Y$ 
is in dimension $n$, then for any $(n-1)$-connected CW complex
$$
[X, Y] \cong \mathrm{Hom}( \pi_n(X), \pi_n(Y) ) .
$$
Then if the homotopy groups of $X$ are also concentrated in dimension $n$, 
an isomorphism $\pi_n(X) \xrightarrow{\cong} \pi_n(Y)$ gives rise to 
a homotopy equivalence $X\xrightarrow{\simeq} Y$.
But what if we don't want to use Whitehead?  I think you are stuck, because basic 
(model category theoretic) arguments can be used to prove Whitehead (at least for 
CW complexes with finitely many finitely generated homotopy groups?) from the uniqueness
of Eilenberg-Mac Lane spaces. 
(Prove it by induction for CW complexes with at most $n$ nonzero homotopy groups;  this requires us to convert maps to fibrations, and we don't want to end up with non-CW complexes, which is why I said we might need finitely generated homotopy groups.)
CLARIFICATION:  When I said "model-theoretic" I meant the basic facts about cofibrations, 
fibrations, induced maps, etc.  The finite generation comes in when we convert a map to a fibration:  this is done with a path space and a pullback, and these things can easily take us away from CW complexes, but my plan was to impose conditions that would guarantee we can apply Milnor's theorem (on loops of CW complexes and so on) to the CW complexes in question.
A: I think you're referring to the argument on page 366 of Hatcher. But there is an earlier argument for $n=1$ in Chapter 1B, which works just as well in general (as Eric Wofsey points out above).
Hatcher deduces

Theorem 1B.8: The homotopy type of a
  CW complex $K(G,1)$ is uniquely
  determined by $G$.

from the following (which is the "functorial" perspective on Eilenberg-MacLane spaces):

Proposition 1B.9. Let $X$ be a
  connected CW complex and let $Y$ be a
  $K(G,1)$. Then every homomorphism
  $\pi_1(X,x_0)\to \pi_1(Y,y_0)$ is
  induced by a map $(X,x_0)\to (Y,y_0)$
  that is unique up to homotopy fixing
  $x_0$.

I won't spell out the details of the argument (you should just read pages 90–91 of Hatcher), but roughly, the proof of the proposition breaks up into the following steps.


*

*There are no obstructions to defining the map on the 0-skeleton (send everything to the basepoint).

*The map from $\pi_1(X)$ to $\pi_1(Y)$ tells you how to define the map on the 1-skeleton.

*The fact that the map is a homomorphism means you can extend it to the 2-skeleton.

*There are no obstructions to extending the map to the 3-skeleton, the 4-skeleton, etc., since any map of the boundary of a ≥3-cell (i.e. a ≥2-sphere) into $Y$ extends over the whole cell.

*(For uniqueness) Any two such maps are homotopic on the 1-skeleton, since the map on $\pi_1(X)$ is specified. This lets you extend any map of $X\times$$\{$$0,1$$\}$ to the 1-skeleton of $X\times [0,1]$. To extend to all of $X\times [0,1]$ and thus prove the maps are homotopic, apply Steps 3 and 4 again.
Once you understand this argument, I think it is definitely worth understanding for yourself why the same steps work for a general $K(G,n)$. The lemma you mention (Lemma 4.31, page 366) is exactly the higher-dimensional analogue of Step 3.
