You have it backward--vector bundles on X are the same as homotopy classes of maps from X to an infinite-dimensional Grassmannian, with the correspondence being given by pulling back the tautological bundle on the Grassmannian. This equivalence holds for any paracompact X. What this means is that vector bundles are not related to homotopy groups but to cohomology--a cohomology class on a Grassmannian pulls back to one on X, given any vector bundle on X. Thus every vector bundle has certain cohomology classes on the base naturally associated to it; these are called characteristic classes and have all sorts of applications. More generally, if you look at all vector bundles on a space as a monoid under direct sum, and formally adjoin additive inverses, you get the 0th group of a generalized cohomology theory called K-theory on X. (Stable) characteristic classes can then be interpreted as natural transformations from K-theory to ordinary cohomology.
In the special case of spheres, you do get a relation to homotopy groups, in that vector bundles on S^n are homotopy classes of maps from S^n to a Grassmannian BO(k), i.e. \pi_n(BO(k)). Using the fact that O(k) is the loopspace of BO(k), this is also the same as \pi_{n-1}(O(k)). You can also see this from the fact that a vector bundle must be trivial on each hemisphere, so it is determined by the transition function between the two trivializations on the equator, which is a map from S^{n-1} to O(k). The fact that line bundles on S^1 are Z/2 is thus not about generators of \pi_1(S^1) but the fact that \pi_0(O(1))=Z/2.