As a motivation for the question, note that $\mathbb{C}P^\infty$ is at the same time a $BU(1)$ and a $K(\mathbb{Z},2)$; therefore, $H^2(X,\mathbb{Z})$ classifies complex line bundles on a space $X$. By the same line of arguments, $BO(1) = \mathbb{R}P^\infty = K(\mathbb{Z}/2\mathbb{Z},1)$, hence real line bundles are classified by $H^1(X,\mathbb{Z}/2\mathbb{Z})$. Further examples, with a somehow trivial flavour, can be obtained as follows: for any discrete group $G$ we have $BG = K(G,1)$. From the opposite point of view, we could say that for any group $\pi$, $K(\pi,1) = B\pi_{disc.}$. This gives rise to a lot of examples and I wonder:
Can we classify the triples $(G,\pi,n)$ of sufficiently nice topological groups1) $G$, arbitrary groups $\pi$ and positive integers $n$ such that $BG = K(\pi,n)$?
1) Please replace sufficiently nice topological groups by whatever setting you can deal with such that the question is interesting. It would be nice to cover the classical compact Lie groups. It will depend on the setting which groups we want to consider isomorphic.
As Tyrone pointed out in the comments, the question is essentially equivalent to the question which topological groups are Eilenberg-MacLane spaces.
Here are some observations, resulting in the homotopical classification:
- If $G$ is commutative and discrete or an $E_n$-space, so that the $n$-th iteration $B^nG = B(B^{n-1}G)$ exists, then we have $K(G,n) = B^nG$ as shown here.
- As discussed in the comments to this question, if $BG$ and $BH$ are homotopy equivalent, then $G$ and $H$ are homotopy equivalent as H-spaces.
Combining these two observations, we conclude that if $BG = K(\pi,n)$, then, understanding $\pi$ as a discrete group, $G$ is H-space homotopy equivalent to $B^{n-1}\pi$. Thus, up to homotopy, we get the complete list as $(K(\pi,n-1),\pi,n)$, but I was hoping to get something finer.