What to do when this theorem can't be applied: How to calculate $H_1$? Consider the following theorem (Lee's book on topological manifolds, page 369):
(Homology Effect of Attaching a Cell) Let $X$ be any topological space and let $Y$ be obtained from $X$ by attaching a closed cell $D$ of dimension $n \ge 2$ along the attaching map $\varphi : \partial D \to X$. Let $K$ and $L$ denote the kernel and the image of $\varphi_\ast :H_{n-1}(\partial D)\to H_{n-1}(X)$. Then the homology homomorphism $H_p(X) \to H_p(Y)$ induced by inclusion is characterized as follows:
(a) If $p < n-1$ or $p>n$ it is an isomorphism
(b) If $p=n-1$ it is a surjection whose kernel is $L$
(c) If $p=n$ it is an injection
How do you calculate homology for $n=1$? Concretely, if we construct the torus by attaching two $1$-cells to a point (so as to get a wedge of circles) and then attach a $2$-cell we can use this theorem to calculate $H_2 (T)$ given that we know $H_1(T)$. I calculated $H_0(T)$ but I don't know how I can calculate $H_1(T)$. How to do it?
 A: One method is to use the fact that $H_1(X)$ is the abelianisation of $\pi_1(X)$. That is
$$H_1(X) \cong \frac{\pi_1(X)}{[\pi_1(X), \pi_1(X)]}.$$
In particular, for $X= T$ the torus, $\pi_1(T) = \mathbb{Z}\times\mathbb{Z}$ which is already abelian, so $H_1(X) \cong \mathbb{Z}\times\mathbb{Z}$.
If instead you take $X = K$ the Klein bottle, then $\pi_1(K) = \langle a, b \mid ab = b^{-1}a\rangle$. The abelianisation of this group is 
\begin{align*}
\frac{\pi_1(K)}{[\pi_1(K), \pi_1(K)]} &= \langle a, b \mid ab = b^{-1}a, ab = ba\rangle\\ 
&= \langle a, b \mid ba = b^{-1}a, ab = ba\rangle\\ 
&= \langle a, b \mid b = b^{-1}, ab = ba\rangle\\
&= \mathbb{Z}\times \mathbb{Z}/2\mathbb{Z}
\end{align*}
so $H_1(K) \cong \mathbb{Z}\times\mathbb{Z}/2\mathbb{Z}$.
Added Later: Given a CW complex $X$, we have $\pi_1(X) \cong \pi_1(X_2)$ and hence $H_1(X) \cong H_1(X_2)$ where $X_2$ is the two-skeleton of $X$. You can't compute $\pi_1(X)$ or $H_1(X)$ from the one-skeleton alone.
If you have the one-skeleton $X_1$ of a (finite) CW complex $X$, then $X_1$ is a wedge sum of $m$ circles, so $\pi_1(X_1) = \langle a_1, \dots, a_m \mid\ \rangle$ (i.e. the free group on $m$ generators) where each $a_i$ corresponds to one of the circles in the wedge sum. 
Now consider attaching two-cells to the one-skeleton via attaching maps $\varphi_j : \partial D^2 \to X_1$, $j = 1, \dots, n$. Denote by $b_j$ the image of $1 \in \pi_1(\partial D^2)\cong \mathbb{Z}$ under the map $(\varphi_j)_{\ast} : \pi_1(\partial D^2) \to \pi_1(X_1)$. Then $\pi_1(X_2) = \langle a_1, \dots, a_m \mid b_1 = \dots = b_n = 1\rangle$. The idea behind this result is that the loop $\varphi_j(\partial D^2)$, when considered as an element of $\pi_1(X_1)$, gives rise to a word in the $a_i$; namely $b_j$. By attaching a two-cell to this loop, one can deform the loop to a point, and therefore the word $b_j$ is trivial in $\pi_1(X_1\cup_{\varphi_j}D^2)$ and hence in $\pi_1(X_2)$.
If you trace through this discussion for the first homology group (using the result in my original answer), we have $H_1(X_1) = \langle a_1, \dots, a_m \mid a_ia_j = a_ja_i\rangle$ and $H_1(X_2) = \langle a_1, \dots, a_m \mid a_ia_j = a_ja_i, b_1 = \dots = b_n = 1\rangle$.
Note, this approach is closely related to cellular homology.
