Chern-Weil theory tells us that the integral Chern classes of a flat bundle over a compact manifold (i.e. a bundle admitting a flat connection) are all torsion. Given a compact manifold $M$ whose integral cohomology contains torsion, one can then ask which (even-dimensional) torsion classes appear as the Chern classes of flat bundles. What is known about this question? I would be interested both in statements about specific manifolds and about general (non)-realizability results.

One specific thing that I know: if $S$ is a non-orientable surface, then there is a flat bundle $E\to S$ whose first Chern class is the generator of $H^2 (S; \mathbb{Z}) = \mathbb{Z}/2$. This shows up, for example, in papers of C.-C. Melissa Liu and Nan-Kuo Ho. As Johannes pointed out in the comments, this also shows that the fundamental class of a product of surfaces can be realized by a flat bundle.

However, I suspect that for a product of 3 Klein bottles, not all the 4-dimensional torsion classes can be realized as second Chern classes of flat bundles. In fact, I think I know a proof of this if one restricts to unitary flat connections: the space of unitary representations has too few connected components.