There are (at least) two details you are missing.
(1) This is not an equivalence of categories between finitely generated graded modules and coherent sheaves. If your module is $0$ in all sufficiently large degrees, then the corresponding sheaf will be zero. For example, let $S=k[x,y]$ and $M=S/\langle x,y \rangle$. The sheaf on $\mathbb{P}^1$ corresponding to $M$ is the zero sheaf.
The category you want to work with is the one whose objects are finitely generated graded modules, and where we formally invert any map which is an isomorphism in sufficiently large degree. (Alternative formulation: we formally invert a map $f:M \to N$ if, for any $s$ in the irrelevant ideal, $s^{-1} f: s^{-1} M \to s^{-1} N$ is an isomorphism.)
(2) Not every coherent sheaf is a vector bundle. Correspondingly, not every finitely generated graded module will correspond to a vector bundle. If we were dealing with an affine variety, vector bundles would correspond to locally free modules. (Also called projective modules.) For projective varieties, things are a little trickier: the criterion is to be locally free away from the irrelevant ideal.
Sadly, I believe that there exist examples of modules which are locally free away from the irrelevant ideal, but are not isomorphic (in the above category) to any module which is locally free at the irrelevant ideal. This should be related to my question here. But you can go a long while without paying attention to this detail.
Dear roger123, let $R$ be a commutative ring and $M$ an $R$-module ( which I do not suppose finitely generated). In order to minimize the risk of misunderstandings, allow me to introduce the following terminology:
Locfree The module $M$ is locally free if for every $P \in Spec (R)$ there is an element $f \in Spec(R)$ such that $f \notin P$ and that $M_f$ is a free $R_f$ - module.
Punctfree The module $M$ is punctually free if for every $P \in Spec (R)$ the $R_{P} $ - module $M_P$ is free.
Fact 1 Every locally free module is punctually free. Clear.
Fact 2 Despite Wikipedia's claim, it is false that a punctually free module is locally free.
Fact 3 However if the punctually free $R$- module $M$ is also finitely presented, then it is indeed locally free.
Fact 4 A finitely generated module is locally free if and only it is projective.
Fact 5 A projective module over a local ring is free.This was proved by Kaplansky and is remarkable in that, let me repeat it, the module $M$ is not supposed to be finitely generated.
A family of counterexamples to support Fact 2 Let R be a Von Neumann regular ring. This means that every $r\in R$ can be written $r=r^2s$ for some $s\in R$. For example, every Boolean ring is Von Neumann regular. Take a non-principal ideal $I \subset R$. Then the $R$- module $R/I$ is finitely generated (by one generator: the class of 1 !), all its localizations are free but it is not locally free because it is not projective (cf. Fact 4) .The standard way of manufacturing that kind of examples is to take for R an infinite product of fields
$\prod \limits_{j \in J}K_j$ and for $I$ the set of families $(a_j)_{j\in J}$ with $a_j =0$ except for finitely many $j$ 's.
Final irony In the above section on counterexamples I claimed that the $R$ - module $R/I$ is not projective.This is because in all generality a quotient $R/I$ of a ring $R$ by an ideal $I$ can only be $R$ - projective if $I$ is principal . And I learned this fact in...Wikipedia !
Best Answer
Given any $R$-module $M$, there is a scheme which corresponds to the 'total space' of $M$, given by $$ Tot(M):=Spec( Sym_R(M*))$$ where $M*$ is the dual module $Hom_R(M,R)$ and $Sym_RM*$ is the symmetric algebra of $M^*$ over $R$. If $M$ happens to a free rank $n$ $R$-module, then $Sym_RM\simeq R[X_1,...,X_n]$. The scheme $Tot(M)$ has a natural map to $Spec(R)$, which is dual to the obvious inclusion $$R\rightarrow Sym_RM$$
If you start with a locally free, finite rank $R$-module $P$, and then consider its total space $Tot(P)$, the corresponding scheme is a vector bundle by your definition. This follows from considering open sets on which $P$ is free, and considering the restriction of $Tot(P)$ over those open sets. Since restriction to an open set is the same as tensoring over the localization, and localization commutes with forming symmetric algebras, the locally freeness becomes your second condition. The first condition is also straightforward.
Then, observe that every vector bundle by your definition arises this way. To see this, follow Mike's comment. Associate to a vector bundle $V$ its sheaf of sections over $Spec(R)$, which is an $R$-module in a natural way. It will be free over the open cover $D(a_i)$, with constant rank $n$.
Edit: As pointed out by roger, the total space construction should use the dual of $M$. As a side note, this means that it is the same if you replace $M$ with $M^{**}$, and so it is not interesting to apply this construction to non-reflexive modules.