Suppose we have a surface S (although the question might make as much sense in higher dimensions) and a topological group G. The data of a flat vector bundle on S (up to isomorphism) is the same as a holonomy representation $\pi_1(S) \to G$; note that this includes both the bundle and the flat structure on it. For the purpose of defining isomorphisms between flat bundles, we can also think of them in Steenrod's terminology: a flat G-bundle is the same thing as a G'-bundle, where G'=G as a group but has the discrete topology.
Is there a way to tell when two G'-bundles over S are isomorphic as G-bundles (in other words, when are two flat bundles isomorphic without regard to the flat structure)? In other words, if two flat G'-bundles are isomorphic as G-bundles, what can we say about the holonomy maps (and is there an if and only if statement)? Does it matter whether the bundles are principal or not?
UPDATE: MOTIVATION.: I'll add a couple of words about my motivation (I was hesitant, since this makes the question a bit less specific). A paper of William Goldman proves that in the cases of $G=PSL_2(\mathbb R)$ or $G=PSL_2(\mathbb C)$, the isomorphism classes of G-bundles correspond exactly to the path-components of the representation variety (see Igor's answer below for more info, Dan's comment for more examples when that happens, and Joel's comment for examples where that does not happen). Even more interestingly, the same paper proves that in the case of $G=PSL_2(\mathbb R)$ all the representations in the path-component that corresponds to the tangent bundle to the surface turn out to be faithful, and to have a discrete image, so the quotient of the corresponding $\mathbb H^2$-bundle by the action of $\pi_1(S)$ gives a nice hyperbolic surface diffeomorphic to S. This does not happen in the case of $G=PSL_2(\mathbb C)$. I am trying to understand which parts of this rather mysterious situation can be understood in general terms, and which cannot.
Thank you very much - the answers people already gave are very helpful! It seems that there might not be a good general answer, but I'm still very interested in what can be said.