de Rham cohomology and flat vector bundles I was wondering whether there is some notion of "vector bundle de Rham cohomology".
To be more precise: the k-th de Rham cohomology group of a manifold $H_{dR}^{k}(M)$ is defined as the set of closed forms in $\Omega^k(M)$ modulo the set of exact forms. The coboundary operator is given by the exterior derivative.
Let now $E \rightarrow M$ be a vector bundle with connection $\nabla^E$ over $M$, and consider the $E$-valued $k$-forms on $M$: $\Omega^k(M,E)=\Gamma(\Lambda^k TM^\ast \otimes E)$.
If $E$ is a flat vector bundle, we get a coboundary operator $d^{\nabla^E}$ (since $d^{\nabla^E} \circ d^{\nabla^E} = R^{\nabla^E}=0$, with $R^{\nabla^E}$ being the curvature) and we can define 

$$H_{dR}^{k}(M,E) := \frac{ker \quad d^{\nabla^E}|_{\Omega^k(M,E)}}{im \quad d^{\nabla^E}|_{\Omega^{k-1}(M,E)}}$$

So my question: Is this somehow useful? I mean can one use this definition to make some statements about $M$ or $E$ or whatever? Or is the restriction of $E$ to be a flat vector bundle somehow disturbing? Or is this completely useless?
 A: There is a another setting in which this is very useful, namely when the flat vector bundle comes from a locally flat geometric structure on a manifold. The best known example is the one of a sphere with the conformal class of the round metric, which is locally conformally flat. This means viewing $S^n$ as a homogeneous space of $G:=SO(n+1,1)$ and via forming homogeneous vector bundles any finite dimensional representation $V$ of $G$ defines a vector bundle on $S^n$ which is canonically endowed with a flat connection. This has an anlog for locally conformally flat manifolds and (with a non-flat connection) for general conformal structures ("tractor bundles" and "tractor connections"). Another nice example is the one of a manifold of dimension $n$ endowed with a hyperbolic metric. This determines a flat projective structure, which again gives rise to tractor bundles corresponding to representations of $SL(n+1,\mathbb R)$ 
The machinery of Berstein-Gelfand-Gelfand sequences then relates the de Rham sequence associated to the tractor connection to sequences of (higher order) invariant differential operators acting on sections of tensor bundles. If the tractor connection is flat, then these operators form a complex which computes the twisted de Rham cohomology. In the case of the sphere, one obtains a resolution of the representation $V$ by principal series representations, which is dual to the Bernstein-Gelfand-Gelfand resolution by Verma modules. This is the starting point of a long story. 
A: This cohomology theory is indeed quite useful. A remarkable place where it (or more precisely its lifting to appropriate derived categories) plays a central role is the Riemann-Hilbert correspondence: it is the correspondence!
A: The exposition by Eugene Xia Abelian and non-abelian cohomology explicitly describes and relates the Betti, Čech, de Rham,  and Dolbeault moduli spaces in the context of the corresponding cohomology theories (see my review here).  It is a well-written synthetic treatment with good references.
A: As you can see from the quick and varied response (is 5 answers in 40 minutes some kind of record?!) the construction is both very useful and has many applications. 
One more topic to add to the list, which ties in very nicely with David Speyer's answer, is the link between so-called Higgs fields and flat bundles over Kahler manifolds. This theory, originally due to Hitchin in 1987, is now very much back in vogue because of the role it plays in geometric Langlands. A good introductory reference is here. I'll give an extremely brief summary too, but the article does a much better job. 
Given a holomorphic vector bundle E over a complex manifold, a "Higgs field" is a holomorphic 1-form A with values in End(E) which also satisfies $A\wedge A =0$ (the product combines wedge-product on forms and Lie bracket on endomorphisms). This means that if we add A to the d-bar operator on bundle valued forms we get something with square zero, giving a twisted version of the Dolbeault complex David Speyer mentioned in his answer. 
Meanwhile, we can build a Higgs bundle by starting with a flat SL(n,C)-bundle. Choosing a Hermitian metric in the bundle we can split the flat connection into two parts, one unitary the other skew-Hermitian. When the metric satisfies a PDE, called "harmonic", the (0,1)-component of the unitary connection gives a holomorphic structure on the bundle and the (1,0)-component of the skew-Hermitian part gives a Higgs field. A theorem of Donaldson and Corlette tells us we can do this whenever the flat bundle is irreducible (i.e. the corresponding rep of the fundamental group is irreducible). Moreover, this construction gives a 1-1 correspondence between stable Higgs bundles and irreducible flat SL(n,C) bundles.
Given a Higgs bundle arising in this way, we now have two different cohomology groups: the twisted Dolbeault groups of d-bar plus A and the coupled deRham groups of the flat connection. Hodge theory tells us that in fact these groups are equal. This is the starting point for a subject called "non-abelian Hodge theory". It gives, amongst other things, deep restrictions on the fundamental groups of Kahler manifolds.   
A: Warning: The first paragraph of the following is outside my expertise.
I am told this construction is very useful in PDE's. If you have a PDE on some manifold $M$, you can often formulate the vector space of solutions as the kernel of some flat connection on a vector bundle. In particular, I believe that the analytic side of the Atiyah-Singer index theorem is the Euler characteristic of the deRham theory you have described.
I can tell you that the analogous construction is very important in complex algebraic geometry. Given a holomorphic vector bundle on a complex manifold, there is a natural way to define a $d$-bar connection on it. (This mean $\nabla_X$ is only defined when $X$ is a $(0,1)$ vector field.) The cohomology of the resulting deRham-like complex, which is called the Dolbeault complex in this setting, is the same as the cohomology of the sheaf of holomorphic sections of the vector bundle. See Wells' Differential Analysis on Complex Manifolds or the early parts of Voisin's Hodge Theory and Algebraic Geometry.
A: A flat connection on a vector bundle of dimension determines a local system $\mathcal{G}$ over your base manifold $M$ by parallel transport, i. e. a functor from the fundamental groupoid of $M$ to the category of abelian groups (isomorphic to $\mathbb{R}^n$). Note that, although all fibers are isomorphic to $\mathbb{R}^n$ they are not canonically isomorphic. To a local system one can associate (singular) cohomology groups with local coefficients. There are two basic ways of doing this:
1) Do the same construction as for usual singular homology/cohomology, but take as coefficients of a simplex $f: \Delta^k\to M$ a value in the fiber of $\mathcal{G}$ over $f(barycenter)$. Boundary maps are defined via choosing a path from the barycenter of $\Delta^n$ to the barycenter of a face.
2) For a connected $M$, a local system is essentially equivalent to a representation of $\pi_1(M)$ on $\mathbb{R}^n$. On the singular chains of the universal cover $\widetilde{M}$, there is also a $\pi_1(M)$ action via deck transformations. You can now tensor the singular chain complex of $\widetilde{M}$ with $\mathbb{R}^n$ over the group ring $\mathbb{R}[\pi_1(M)]$ and take then homology/cohomology. 
I guess, these cohomology groups with local coefficients should be isomorphic to your ''vector bundle deRham cohomology'', though I know no reference at the moment.
Homology/cohomology groups with local coefficients are good for many things in general. I have seen them mostly in the Serre spectral sequence (computing homology/cohomology groups of fiber bundles) where the $E^2$-term is usually written in terms of them. Another application is Poincare duality for non-orientable manifolds.
A: One way to look at this, which puts it into a wide context, is this:
the complex called $H_{dR}(M,E)$ in the question (maybe better $H_{dR}(E,\nabla)$) is the "Chevalley-Eilenberg" complex of the action-Lie algebroid given by the action of the tangent Lie algebroid on the (fiberwise) dual vector bundle $E^*$ induced by $\nabla$.
More generally, one can allow representations on complexes of vector bundles, in which case we are talking about oo-Lie algebroid representations
Some remarks on the conceptual background of such actions of oo-Lie algebroids is at Lie oo-algebroid representation.
This is something that keeps being reinvented. A powerful result on the structure of the dg-category of such oo-Lie algebroid representations is in this article by Jonathan Block. More recently Marius Crainic is studying these structures under the name Representations up to homotopy of Lie algebroids.
Whatever you call it, there is always the weak quotient of the oo-Lie algebroid you are acting on by tat you are acting with, just as with Lie oo-groupoids aka oo-stacks. The Chevalley-Eilenberg algebra of that weak quotient is the kind of complex that the question here is about.
A: This is very useful. The requirement that the connexion is flat is fundamental. It is equivalent to the fact that the de Rham complex is indeed a complex. It is also equivalent to the fact that the ring $D_M$ of differential operators on $M$ acts on $E$. This leads to the theory of D-modules and the algebro-geometric study of differential equations.  
A: A view not yet mentioned is the following: The universal cover $\tilde M$ is a principal fiber bundle over $M$ with structure group $\pi=\pi_1(M)$, and a flat connection on $E$ identifies $E$ as the assiciated bundle to $\tilde M$ for the holonomy representation of $\pi$ in $V:=E_{x_0}$, the fiber over the base point. 
Then $\Omega(M,E)\cong \Omega(\tilde M,V)^\pi = (\Omega(\tilde M)\otimes V)^\pi$ and $H^k_{dR}(M,\nabla) = H^k((\Omega(\tilde M)\otimes V)^\pi) = (H^k_{dR}(\tilde M)\otimes V)^\pi$.
A: This is the de Rham version of cohomology with local coefficients.  It's also the cohomological version of "twisted K-theory".
It's not "completely useless" at all.  A simple example of this is when $E$ is the orientation line bundle.  Then this cohomology is dual to ordinary cohomology, even if the manifold is not orientable.  Indeed, the pairing between ordinary de Rham cohomology and this cohomology is the true pairing, and if the manifold is orientable then it becomes what we usually call Poincare duality.
A nice explanation of this, with an eye to Twisted K-Theory, is in the introduction to Atiyah and Segal's recent(ish) paper of the same name (available on the arXiv).
