Let $X$ be a connected CW complex.
Let $X_n$ fit into a commutative postnikov diagram for $X$ and let the fibrations $K(\pi_n(X),n) \hookrightarrow X_n \xrightarrow{\mathscr p} X_{n-1}$ be given. Let the projections $p_n:\Pi_{i\leq n} K(\pi_i(X), i) \to \Pi_{i\leq n-1} K(\pi_i(X), i)$ be given.
We know that $X_n$ and $ \Pi_{i\leq n} K(\pi_i(X), i)$, where $X_n$ is the $n-th$ base of the postnikov tower for $X$, have the same homotopy groups. One of the motivations for studying postnikov towers is that they don't necessarily have the same homotopy type.
Now suppose that there are topological maps $\phi_n: X_n \to \Pi_{i\leq n} K(\pi_i(X), i)$ realizing the isomorphism of homotopy groups. And suppose that the diagram $\phi_n \mathscr p_{n+1} = p_{n+1} \phi_{n+1}$ commutes.
This is equivalent to the fibrations in the postnikov tower for $X$ with fiber $K(\pi_n(X),i)$ being homotopy equivalent to the trivial product fibrations.
In any case we know that $\Pi_{i\leq n} K(\pi_i(X), i)$ fit into a postnikov tower for $X$ because we have maps from $X \to \Pi_{i\leq n} K(\pi_i(X), i)$ formed as the compostion $X \to X_n \xrightarrow{\phi_n} \Pi_{i\leq n} K(\pi_i(X), i)$; we also have the fibrations $p_n$ and these form a commutative postnikov diagram.
In this case we have the canonical map $X \to \underset{\xleftarrow{n}}{lim} \Pi_{i\leq n} K(\pi_i(X),i)=\Pi_i K(\pi_i(X),i)$ which will be a homotopy equivalence by whitehead's theorem.
Question: The above basically gives a necessary and sufficient condition for $X$ to be homotopy equivalent to $\Pi_i(K(\pi_i(x),i))$. What are some examples where this happens?
$\newcommand{\Z}{\mathbb{Z}}$ The question is equivalent to when $X$ can be written as a product of eilenberg mclane spaces. First why the question is important: The motivation for introducing Postnikov towers is to show that every space can be written as a fibered product of Eilenberg MacLane spaces. It is desirable to know if the $k$ invariants, the characterstic classes from which the postnikov tower fibration constructed through transgressions, are trivial. Such information could be useful when finding the fiber of a serre fibration by using a long exact sequence since then when the k-invariants are trivial, one only needs to find the homotopy groups of the fiber to determine the fiber up to weak homotopy equivalence.
Observation: If $X$ is trivially a product of Eilenberg MacLane spaces, i.e. $X=\Pi_{n \geq 0} K(G,n)$, then $\pi_n(X)=G \Rightarrow$ $X=\Pi_{n \geq 0} K(\pi_n(X),n)....................................(1)$
Let us begin with an example where this doesn't happen.
If $X= S^2$, then the corresponding product into Eilenberg MacLane spaces, = $K(\Z,2) \times K(\Z,3) \times K(\pi_4(X),4)......................(2)$.
The $H^3$ cohomology of (2) is the same as $H^3( K(\Z,2) \times K(\Z,3))=\Z$. Thus $H^3(S^2)=0 \neq $ $H^3$ cohomology of $(2) \Rightarrow$, $S^2$ is not a product of Eilenberg Maclane spaces.
Note that in the above situation there is no retraction of the map $\pi_3(S^2) \to H_3(S^2)$. Whereas when $X=\Pi_{k \geq 0} K(\pi_k(X),k)$, with $\pi_1(X)$ abelian, there is the obvious retraction $H_n(X) \to H_n(K(\pi_n(X),n)) \oplus (\text{other terms in Kunneth}) \to H_n(K(\pi_n(X),n)) \cong \pi_n(X)$. This is actually a sufficient condition:
Theorem: Let $X$ be a CW complex with $\pi_1$ abelian, and $h_n:\pi_n(X) \to h_n(X)$ be the Hurewicz homomorphism modulo the 0 class of abelian groups given by serre's exact sequence. Then $(\exists \phi_n: H_n(X) \to \pi_n(X)$ s.t. $\phi \circ h_n:\pi_n(X) \xrightarrow{id} \pi_n(X) )\iff$ $(X=\Pi_k K(\pi_k(X),k))$.
Pf. Suppose the Hurewicz map has a retraction in every dimension. View $\phi_n: H_n(X,Z) \to \pi_n(X)$ as an element in $H^n(X,\pi_n(X))$ since the required $Ext$ group must be 0, and let $\Phi_n$ be the corresponding representation in the infinite loopspace $\Phi_n: X \to K(\pi_n(X),n)$.
Then naturality of the Hurewicz isomorphism implies that $\Phi_{n*}:\pi_n(X) \to \pi_n(K(\pi_n(X),n))$ is an isomorphism as we show now: We have the following diagram $\require{AMScd}$ $\begin{CD} \pi_n(X) @>h_n>> H_n(X,\Z)\\ @VV\Phi_{n*}V @VV\Phi_{n*}V\\ \pi_n(K(\pi_n,n)) @>\tilde h_n>> H_n(K(\pi_n(X),n),\Z) \end{CD}$
The right $\Phi_{n*}$ is actually the retraction $\phi$: Let $\iota\in H^n(K(\pi_n,n),\pi_n)$ be the fundamental class of $K(\pi_n(X),n)$ given by the map $H_n(K(\pi_n,n)) \xrightarrow{\iota} \pi_n(X)$, or alternatively by the map $K(\pi_n,n) \xrightarrow{id} K(\pi_n,n)$. $\Phi_n^*(\iota)$ is the map $\phi: H^n(X) \to \pi_n(X)$ since this is how the isomorphism of cohomology theories given by the $E^\infty$ spectra and singular cohomology is given. Thus using the definition of the pullback of $\iota$ under $\Phi$, $\Phi_* \circ \iota_*= \phi$. $\iota_*=id_{H_n(K(\pi_n,n),\Z)} \Rightarrow$ result.
Thus the composition of the arrows $\Phi_{n *} \circ h_n=\phi \circ h_n=id_{\pi_n(X)}$. The arrow $\tilde h_n$ is also an isomorphism since $K(\pi_n(X),n)$ is $n-1$ connected. Therefore the map $(\Phi_1, ...., \Phi_n,...):X \to \Pi_{k \geq 0} K(\pi_k(X),k)$ continuous in the weak topology, is a weak homotopy equivalence.
Here is where Qiaochu Yuan's comment comes in:
When $\pi_1$ is not abelian we can use that the abelianization of the space should be a product of eilenberg maclane spaces iff the the space is a product of eilenberg maclane spaces, but it doesn't follow from the route I was trying to pursue earlier(I said incorrectly because the first $k$ invariant, i.e. the transgression of the fundamental class of the fiber of $X \to K(\pi_1(X), 1)$, is a map $X \to K(\pi_2(X),3)$, which is still going to be homotopy equivalent to a point. But not sure that the inductive step using the transgressions in building the postnikov tower would still be okay)