Can homology group $H_n(X)$ be $\mathbb{Q}$? Is there some topological space $X$ such that its homology group $H_n(X)=\mathbb{Q}$? Why? Why not?
 A: Yes. Take for example the classifying space $X = B\mathbb{Q}$, which is a path-connected space whose fundamental group is $\mathbb{Q}$ and whose higher homotopy groups are trivial. Then we get $$H_1(X) \cong \pi_1(X)^{\text{ab}} = \mathbb{Q}^{\text{ab}} = \mathbb{Q}$$ by the Hurewicz theorem.
Actually, you can also take any other path-connected space with fundamental group $\mathbb{Q}$ to get $H_1(X) = \mathbb{Q}$ by Hurewicz. One explicit such example can be found in an exercise from Hatcher (if I remember correctly) in case that you are interested in this particular case of $n = 1$.
A: Example 2.40 in Hatcher's book is the Moore space: for any abelian group $G$ and any positive integer $n$, he constructs a space whose $n$th homology is isomorphic to $G$, other (reduced) homology groups zero.
A: You can construct an example for every $n > 0$ by expressing $\mathbb{Q}$ as a directed colimit of copies of $\mathbb{Z}$ and then constructing a corresponding directed colimit of CW complexes, and then apply the fact that $H_*(colim_k X_k) \cong colim_k H_*(X_k)$ for directed colimits (see for example page 115 of May's "Concise Course..."). It's impossible in degree $0$ though because $H_0(-;\mathbb{Z})$ is always a free abelian group and $\mathbb{Q}$ is not free.
Let $\{a_k\}_{k\in\mathbb{N}_{>0}}$ be a sequence of positive integers such that every prime appears infinitely many times. According to this group theory answer the abelian group $\mathbb{Q}$ is isomorphic to the colimit of the diagram 
$$ \mathbb{Z} \stackrel{a_1}{\to} \mathbb{Z} \stackrel{a_2}{\to} \mathbb{Z} \stackrel{a_3}{\to} \mathbb{Z} \stackrel{a_4}{\to} \dots $$
So, Hint: construct a sequence of topological spaces $\{X_k\}$ and continuous functions $\{\iota_k\colon X_{k-1} \to X_k\}$ which induces the above sequence of groups and homomorphisms after applying $H_n(-)$.
If you're having trouble doing this, keep reading below (you should fill in any missing details yourself, and I hope I didn't get any indices wrong).

Here is one way of constructing such a sequence where $X_k$ is a CW subcomplex of $X_{k+1}$. Let $X_0 = S^n$, so that $H_n(X_0)\cong \mathbb{Z}$. Now let $X_1$ be the cell complex formed by attaching an $(n+1)$-cell to $S^n\vee S^n$, such that at the chain level the boundary of this cell is $a_1g_1 - g_0$ where $g_0$ and $g_1$ are the generators of $C_n(X_1)$ corresponding to the two spheres. Note that the $n$-th homology group of this space is still $\mathbb{Z}$ (generated by $[g_1]$), and there is a natural inclusion $X_0 \hookrightarrow X_1$ whose image in homology is $a_1\mathbb{Z}$.
In general construct $X_{k+1}$ by attaching an $(n+1)$-cell to $X_k \vee S^n$ so that the boundary is $a_{k+1}g_{k+1} - g_k$, where $g_k$ is the generator of $C_n(X_k)$ corresponding to the new sphere in $X_{k-1} \vee S^n$ and $g_{k+1}$ corresponds to the new sphere in $X_k\vee S^n$. Then $H_n(X_{k+1}) = \langle g_{k+1}\rangle \cong \mathbb{Z}$, and for all $0\leq j \leq k$ there is a natural inclusion $X_j \hookrightarrow X_{k+1}$ whose image in homology is $(\prod_{i=j+1}^{k+1}a_{i})\mathbb{Z}$, and in particular the inclusion $X_k \hookrightarrow X_{k+1}$ has image $a_{k+1}\mathbb{Z}$ in homology.
Now let $X = colim_k X_k$, so that $H_n(X) = colim_k H_n(X_k)$.
