It seems that I read this somewhere else, but I did not find the correct reference now.
We know that a vector bundle $E\to M$ is a (projective or locally free) module of $C^\infty(M)$. Then how to express the connection on $E$ pure algebraicaly?
In other words, the formulation should lead to a notion of connection for any module over a (differential?) algebra.
If $X \to S$ is morphism of locally ringed spaces and $M$ is some $\mathcal{O}_X$-module, a connection of $M$ over $S$ is an $\mathcal{O}_S$-homomorphism $\nabla: M \to M \otimes_{\mathcal{O}_X} \Omega^1_{X/S}$ such that $\nabla(am)=a \nabla(m) + m \otimes d(a)$ for local sections $a$ of $\mathcal{O}_X$ and $m$ of $M$. This works for schemes, but also for manifolds (both are locally ringed spaces). In the case of manifolds, we can use partitions of unity etc. and deduce that $\nabla$ is completely determined by its map on global sections (this is the connection to Vladimir's answer).