Compute the homology of the CW complex directly from the cell structure Let $X$ be a CW-complex. Define an equivalence class on $X$ to be $\alpha(X)$, and $Y \in \alpha(X) \iff Y$ homotopy equivalent to $X$.
Define an ordering on cell structures:


*

*The cell structure with a smaller number of cells is smaller. E.g. $e_0 \cup e_5 < e_0 \cup e_1 \cup e_2$ since $2 < 3$.

*Given two cell structures with the same number of cells, the first dimension counting from $0$ in which the number of cells differs determines the smaller cell structure to be the one that has more cells in that dimension. E.g. $e_0 \cup e_3 < e_0 \cup e_4$ since the first dimension in which the cell multiplicities differ is $3$ and $e_0 \cup e_3$ has $1$ cell $e_3$ in that dimension while $e_0 \cup e_4$ has $0$ and $1 > 0$.
Define a minimal cell structure for $X$ to be the least cell structure out of all possible cell structures for all $Y \in \alpha(X)$ under the just defined ordering. 
Claim: For every dimension $n$, the betti number of $n$-th homology group of $X$ is the Cartesian power coefficient of the cell $e_n$ in the minimal cell structure of $X$.
Examples:


*

*$S^n = e_0 \cup e_n$, $H_i(S^n)=\mathbb{Z}$ if $\in \{0, n\}$, $H_i(S^n)=\mathbb{0}$ if $i \notin \{0, n\}$, claim holds here, $S^n$ is orientable.

*$T^2 = e_0 \cup e_1^2 \cup e_2$, $H_0(T^2) = \mathbb{Z}$, $H_1(T^2) = \mathbb{Z}^2$, $H_2(T^2) = \mathbb{Z}$, $H_i(T^2) = 0$ for $i>2$, claim holds, $T^2$ is orientable.

*Solid Torus. $D^2 \times S^1 = e_0 \cup e_1^2 \cup e_2^2 \cup e_3$, but $D^2 \times S^1$ is homotopy equivalent to $S^1 = e_0 \cup e_1$ which has fewer cells in its cell structure. Hence $H_i(D^2 \times S^1) = \mathbb{Z} \iff i \in \{0,1\}$ and $H_i(D^2 \times S^1) = \mathbb{0} \iff i > 1$, claim holds, the solid torus is orientable and all its homology groups are torsion-free.

*Projective space $\mathbb{R}P^2=e_0 \cup e_1 \cup e_2$ and $H_0(\mathbb{R}P^2)=\mathbb{Z}$, $H_1(\mathbb{R}P^2)=\mathbb{Z_2}$, $H_i(\mathbb{R}P^2)=0, i>1$. But $\mathbb{R}P^2$. The claim does not hold. $\mathbb{R}P^2$ is not orientable.

*Projective space $\mathbb{R}P^3=e_0 \cup e_1 \cup e_2 \cup e_3$ and $H_0(\mathbb{R}P^3)=\mathbb{Z}$, $H_1(\mathbb{R}P^3)=\mathbb{Z_2}$, $H_3(\mathbb{R}P^3)=\mathbb{Z}$, $H_i(\mathbb{R}P^3)=0, i>3$ or $i=2$. The claim does not hold. $\mathbb{R}P^3$ is not orientable. It has $H_1(\mathbb{R}P^3)=\mathbb{Z_2}$ which is not torsion-free.
Question: What are the least restricting conditions for a $CW$-complex implying the claim? It may hard to find the most general conditions, but the more general the more I will appreciate the answer!
Some of the conditions on $X$ to consider:


*

*$X$ is orientable.

*homology groups of $X$ are torsion-free.

*$X$ is a manifold.
 A: Let $X$ be a CW-complex whose cellular chain complex $C_{\bullet}(X)$ has all zero differentials.  Note that this necessarily occurs when $X$ does not have cells in consecutive dimensions, e.g. $S^n$ for $n \geq 2$, $\mathbb{C} \mathbb{P}^n$ for $n \geq 1$.  It also occurs for $S^1$.  Then $C_n(X) \cong H_n(X,\mathbb{Z})$ for all $n$.  Such a complex must be "minimal" in your sense: if you had fewer cells in any given dimension that would give rise to a smaller Betti number.  
It follows from the Eilenberg-Zilber Theorem that a finite product of CW-complexes with all zero differentials has all zero differentials.  This shows for instance that the $n$-dimensional torus has this property for all $n \in \mathbb{Z}^+$.  In particular this explains all of your examples.  
Conversely, let $X$ be a finite CW-complex whose $n$th Betti number is equal to the number of $n$-cells for all $n$.  Let $d_n$ be the $n$th differential in the singular complex.
Let $K_n$ be the kernel of $d_n$ and $I_{n}$ be the image of $d_{n+1}$.  Then 
$K_n \subset \mathbb{Z}^n$, so $K_n \cong \mathbb{Z}^d$ for some $d \leq n$.  Further $K_n/I_n \cong \mathbb{Z}^n \oplus T$ for a finite abelian group $T$, so $\mathbb{Z}^n \oplus T$ is a homomorphic image of $\mathbb{Z}^d$.  We must then have $d =n$ and $T = 0$, so the map $K_n \rightarrow K_n/I_n$ is a surjective map from $\mathbb{Z}^n$ to itself.  Such a thing is known to be an isomorphism, e.g. by structure theory of finitely generated modules over a PID.  In other words $I_n = 0$ and all the differentials are trivial.  In particular all of the homology groups are free abelian.  
