Stiefel–Whitney classes in the spirit of Chern-Weil Chern-Weil theory gives characteristic classes (e.g. Chern class, Euler class, Pontryagin) of a vector bundle in terms of polynomials in the curvature form of an arbitrary connection.  There seems to be no hope in getting Stiefel-Whitney classes from this method since Chern-Weil gives cohomology classes with real coefficients while Stiefel-Whitney classes have $\mathbb Z/2$ coefficients.  Further, since any vector bundle over a curve has vanishing curvature, classes obtained by Chern-Weil can't distinguish, for example, the Mobius bundle from the trivial bundle over the circle (while Stiefel-Whitney classes do).
Nonetheless, I am wondering if there is a more general or abstract framework that allows one to define the Stiefel-Whitney classes in the spirit of Chern-Weil.  For example, maybe this is done through a more abstract definition of a connection/curvature.
 A: I want to say the short answer is no.
But in certain contexts, we can get things that are analogous.  For example if you take a principal $B$-bundle $Q$ over $M$ and then suppose you can have a "nice" :)  central extension of your lie group $B$ by $$1 \to \underline{\mathbb{C}^*}_M \to \tilde{B} \to B \to 1,$$where $\underline{\mathbb{C}^*}_M$ is the sheaf of smooth functions into $\mathbb{C}^*$, then you can define a cohomology class in $H^1(M, \underline{B})$ by seeing how well you can lift your bundle to a $\tilde{B}$-bundle.  Now by the central extension, we would have $$H^1(M, \underline{B}) \overset{\sim}{=} H^2(M , \underline{\mathbb{C}^*}_M)$$ and then by the exponential sequence you would have $$H^1(M, \underline{B}) \overset{\sim}{=} H^2(M , \underline{\mathbb{C}^*}_M) \overset{\sim}{=} H^3(M, \mathbb{Z}).$$
And so what I am saying (since principal bundles have associated vector bundles) that your vector bundle in the right conditions could give you a degree three cohomology class in the integers.  I'm sure you could pluck your Z/2 coefficients out of this (I don't know why you would want to be so rigid, nor am I claiming you are asking for that).  Then there is an actual geometric interpretation of this integer related to a certain curvature form in this construction that I am not quite ready to add to this answer yet :)
A: There exist flat manifolds (i.e., closed Riemannian manifolds with vanishing sectional curvature) which do not admit any spin or spin${}^c$-structure. But since the existence of spin, resp. of spin${}^c$-structures is detected by the second Stiefel-Whitney class, I am strongly led to believe that there is no way of defining these à la Chern-Weil. The reason is that the phrase 'à la Chern-Weil' entails for me that you use in an essential way the curvature tensor, but in these examples it vanishes.
