Is there a way to establish a correspondence between the vector bundles over a torus and some kind of homotopy groups, just as we do to spheres By introducing the "clutching function" one can relate the complex (real) vector bundles on a sphere with homotopy groups of $GL_n(\Bbb C)$ ($GL_n^+(\Bbb R)$ for oriented ones). Can we do a similar thing to torus? The motivation is that I'm curious about how many vector bundles of rank 1,2,3,... are there over our familiar spaces, at least for some specified low rank. (BTW, It seems in the case of 2, plane bundles correspond to $H^2(X,\Bbb Z)$?)
 A: I don't have an answer to your question, but I wanted to clear up a misunderstanding you seem to have.  That is, it is the case that rank 2 orientable bundles over orientable manifolds bijectively correspond to $H^2(X,\mathbb{Z})$.
To see orientability of the bundle is necessary, notice that $S^1$, by your clutching function argument, has 2 rank 2 bundles over it, but $H^2(S^1,\mathbb{Z}) = \{0\}$.  One of these bundles is the Möbius band + trivial bundle and is nonorientable.
To see orientability of the base is necessary, notice that $\mathbb{R}P^2$ has at least 4 rank 2 bundles over it corresponding to $TRP^2$, the trivial bundle, the canonical bundle + trivial rank 1 bundle, and the canonical + canonical bundle.  All 4 have different Stiefel Whitney classes, so are distinct bundles.  On the other hand, $H^2(\mathbb{R}P^2,\mathbb{Z}) = \mathbb{Z}/2\mathbb{Z}$ has only 2 elements in it.
To see this works when everything is orientable, start by putting a Riemannian structure on your rank 2 vector bundle $E\rightarrow M$ and let $E_1$ denote the unit length vectors.  The distance squared function $d^2:E\rightarrow \mathbb{R}$ is easily seen to be smooth everywhere and $1$ is a regular value, hence $E_1$ is an embedded submanifold, called the unit sphere bundle.  (It can be shown that the diffeomorphism type of $E_1$ doesn't depend on the Riemannian structure chosen).
The projection map restricted to $E_1$ gives $E_1$ the structure of a fiber bundle over $M$ with fiber $S^1$ (or, for a rank $n$ bundle, $S^{n-1}$).
Now, in the special case of $n=2$ (and $n = 4$), $S^1$ is a Lie group so it makes sense to ask if the bundle $S^1\rightarrow E_1\rightarrow M$ is a principal bundle - is there a free $S^1$ action on $E$ acting freely and transitively on the fibers.  For a circle acting on itself freely and transitively, you basically only have 2 options - either $z*z_1 = zz_1$ or $z*z_1 = \overline{z}z_1$, where we're interpreting $S^1\subseteq \mathbb{C}$.  Intuitively, the circle spins itself and the issue is if we can make all the circle fibers spin the "same" way.
It turns out, orientability is precisely the condition we need to guarantee they spin the same way.  To see this, the idea is to pick a consistent orientation of $E$ and $M$ and define the "right" way to spin the circle as the one so that direction, followed by a positively oriented frame on $M$ pulled back, gives the orientation on $E$.  Now define the $S^1$ action on $E_1$ by having it spin each fiber in the "right" way.
This gives $E_1$ the structure of a principal $S^1$-bundle.  Such things are classified by a homotopy class of map into $BS^1 = S^\infty/S^1 = \mathbb{C}P^\infty$.  Now, $\mathbb{C}P^\infty$ just happens to be a $K(\mathbb{Z},2)$, so principal circle bundles are classified by a homotopy class of maps from $M$ into $K(\mathbb{Z},2)$, and such homotopy classes are canonically in bijection with $H^2(M,\mathbb{Z})$.
Finally, principal $S^1$ bundles are in 1-1 correspondance with oriented rank $2$ bundles.  We've already talked about the map from oriented rank 2 bundles to principal $S^1$ bundles.  Going backwards, one can "fill in the fibers", treat each $S^1$ fiber as if it's sitting in a $\mathbb{C}$ and reconstruct the rank 2 vector bundle from this.
A: To actually answer the question, according to Grigory M. here: How to compute homotopy classes of maps on the 2-torus?, the homotopy classes of maps from $T^2$ into $X$ are in 1-1 correspondence with $\{(a,b,s)\in \pi_1(X)^2\times \pi_2(X)| ab=ba\}$.
What is the appropriate $X$ here?
Well, to every rank $k$ vector bundle $E$, after choosing a Riemannian structure on it, there is an principal $O(k)$ bundle for which $E$ is the associated bundle under the usual action of $O(k)$ on $\mathbb{R}^k$.
Hence, rank $k$ vector bundles over $T^2$ are in bijection with principal $O(k)$ bundles on $M$, and these are in bijection with $[T^2, BO(k)]$.  By the above, these are in bijection with $\{(a,b,s)\in \pi_1(BO(k))^2\times \pi_2(BO(k))| ab=ba\}$.
So, what are $\pi_1(BO(k))$ and $\pi_2(BO(k))$?  Well, we have a fibration $O(k)\rightarrow EO(k)\rightarrow BO(k)$ with $E$ contractible.  The associated long exact sequence of homotopy groups shows that $\pi_k(BO(k)) = \pi_{k-1}(O(k))$.
So, such bundles are classified by an element of $\pi_0(O(k))\times\pi_0(O(k))\times\pi_1(O(k))$. (the condition $ab=ba$ is automatic).  So, when $k=1$, they're classified by an element of $(\mathbb{Z}/2\mathbb{Z})^2$, rank 2 bundles are classified by $(\mathbb{Z}/2\mathbb{Z})^2\times\mathbb{Z}$, and rank $\geq$ 3 bundles are classified by $(\mathbb{Z}/2\mathbb{Z})^3$.
In the oriented case, one changes all of the $O(k)$s to $SO(k)$s, so rank $k$ oriented bundles over $T^2$ are in bijection with $\pi_0(SO(k))\times\pi_0(SO(k))\times\pi_1(SO(k)) = \pi_1(SO(k))$.  Thus we see that there is a unique oriented rank 1 bundle, the rank 2 bundles are in bijection with $\mathbb{Z}$, and the rank $\geq 3$ bundles are in bijection with $\mathbb{Z}/2\mathbb{Z}$.
A: There is some kind of stabilization phenomenon for vector bundles: $\operatorname{Vect}_n(X)$ doesn't depend on $n$ when $n$ is large enough (the corresponding set is denoted $\widetilde K(X)$ and is much, much more computable than $Vect_n$ in general). More precisely, for complex vector bundles everything is stable when $2n+1>\dim X$.
This solves the complex version of the question, because $\operatorname{Vect}_1(\mathbb T)$ is already stable and $\operatorname{Vect}_1(X)=H^2(X;\mathbb Z)$ (as Jason's answer explains, essentially).
Now the proof of stabilization goes roughly as follows. For any group $G$, $G$-bundles are in bijection with homotopy classes of maps to some space $BG$ (cf. Jason's answer again). And for any inclusion of groups $H\subset G$ there is a fibration $BH\to BG$ with fiber $G/H$. But for $GL_n\subset GL_{n+1}$ this fiber is (up to homotopy equivalence) just $S^{2n+1}$ which doesn't have cells of dim<2n+1 — and this implies stablization (by cellular approximation, more or less).
(And the real case is more complicated because it's stable only for $n\ge 3$.)
