Classify sphere bundles over a sphere 
Problem
(1) Classify all $S^1$ bundles over the base manifold $S^2$.
(2) Do the same question for $S^2$ bundles.

Moreover, does there exist a universal method to solve this kind of problem? What mathematical tool and concept should be required? And, could someone suggest some reference books related to the problem?
(I'm not sure my tags are correct)
 A: The key to answering this question is the clutching construction. Let $p_1, p_2$ be antipodal points on $S^2$ and define $U_i = S^2\setminus\{p_i\}$. Note that $U_i$ is homeomorphic to $\mathbb{R}^2$ (via stereographic projection) and therefore contractible.
Suppose $E$ is an $S^1$-bundle over $S^2$, then as $U_1$, $U_2$ are contractible, $E|_{U_1}$ and $E|_{U_2}$ are trivial; i.e. there are bundle isomorphisms $\psi_i : E|_{U_i} \to U_i\times S^1$. Therefore, the bundle $E$ is completely determined by the transition map $\phi_{12} : U_1\cap U_2 \to \operatorname{Homeo}(S^1)$ which satisfies 
$$\psi_2|_{U_1\cap U_2} = (\operatorname{id}_{U_1\cap U_2}, \phi_{12})\circ\psi_1|_{U_1\cap U_2}.$$
It turns out that isomorphism classes of such bundles correspond to homotopy classes of such maps. That is, isomorphism classes of $S^1$-bundles over $S^2$ are in one-to-one correspondence with homotopy classes of maps $U_1\cap U_2 \to \operatorname{Homeo}(S^1)$, i.e. $[U_1\cap U_2, \operatorname{Homeo}(S^1)]$. Note that $U_1\cap U_2$ deformation retracts onto $S^1$ (the equator of $S^2$), so 
$$[U_1\cap U_2, \operatorname{Homeo}(S^1)] = [S^1, \operatorname{Homeo}(S^1)] = \pi_1(\operatorname{Homeo}(S^1)).$$
In order to compute this, we use the fact that $\operatorname{Homeo}(S^1)$ deformation retracts onto $O(2)$ and therefore $\pi_1(\operatorname{Homeo}(S^1)) = \pi_1(O(2)) = \mathbb{Z}$.

I see that Mike Miller has now posted an answer, so I will stop here as his answer addresses the general picture.
A: Every $S^1$ bundle can be linearized: it's the unit sphere bundle of a 2-dimensional real line bundle. This is because in the smooth category $\text{Diff}(S^1)$ deformation retracts onto $O(2)$, so you may choose your bundle's cocycles to be linear (and then just define a vector bundle with the same cocycles). It's harder to show, but still true, that $\text{Diff}(S^2) \simeq O(3)$, and $\text{Diff}(S^3) \simeq O(4)$. This does not generalize; it's known that $\text{Diff}(S^n) \not\simeq O(n+1)$ for $n>4$, and it's probably not true for $n=4$.
It's also false that, $\text{Homeo}(S^n) \simeq O(n+1)$ for every $n$, but I don't know precisely where it fails - it's at least true for $n \leq 3$. 
The best we have is $\text{PLHomeo}(S^n) \simeq O(n+1)$ for all $n$. So if you have a piecewise linear sphere bundle you can always linearize it. 
Now that we know this, you're just asking for us to classify the 2- and 3-dimensional vector bundles over $S^2$. These are classified by $\pi_1(SO(2)) = \Bbb Z$ and $\pi_1(SO(3))=\Bbb Z/2\Bbb Z$ respectively, by a construction known by the name of 'clutching functions'; essentially, you trivialize your vector bundle on the top and bottom discs and see what automorphism on the central $S^1$ they differ by. You can read the details in Hatcher's vector bundles book.
