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)
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.