When do two holonomy maps determine flat bundles that are isomorphic as just bundles (w/o regard to the flat connections)? 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.
 A: A principal bundle is  flat if it has a flat connection, and the equivalence class of flat connections gives a  flat structure  on the bundle. Now of course, an isomorphism of principal bundles which admit flat structures, need not preserve the flat structures. For example, consider two homomorphisms $\pi_1(S)\to G$ that lie in the same path-component of the representation variety. The path joining them defines a $G$-bundle over $S\times I$, so by the covering homotopy theorem any two flat bundles in the path are isomorphic as principal bundles. On the other hand, two flat bundles are equivalent if and only if the corresponding homomorphisms are conjugate.
Exactly the same argument applies to non-principal flat bundles, e.g. bundles with fiber $F$ induced by homomorphisms $\pi_1(S)\to Diff(F)$.
A: The usual algebraic topology way to address this is to consider the identity as a continuous map from $G$ with the discrete topology (call it $G^d$) to $G$ as a lie group. Then a homomorphism $\pi_1(X)\to G$ is the same  (modulo conjugation, which doesnt affect your question) as a homotopy class of maps $X\to BG^d$. The principal $G$ bundle that corresponds to it is given by the composite $X\to BG^d\to BG$. So the (not always useful) consequence is that your question is about understanding the kernel/image of $[X,BG^d]\to[X,BG]$. One thing you see from this is that characteristic classes you get on flat bundles factor through $H^*(BG)\to H^*(BG^d)$. As Igor B. notes, when Chern-Weil theory applies you conclude that the characteristic classes are torsion.
For example, for $G=U(1)$   (and similarly for any abelian $G$)  $BG^d=K(R/Z,1)$, $BG=BU(1)=K(Z,2)$ and $[X,BG^d]\to [X, BG]$ is just the Bockstein $H^1(X;R/Z)\to H^2(X;Z)$, which takes  $\pi_1(X)\to U(1)$   to the first Chern class of the underlying bundle. So computing with the coefficient exact sequence tells you about the kernel (what flat $U(1)$ bundles are trivial as bundles) and the image (what bundles admit flat $U(1)$ connections.)
This perspective is also useful when combined with obstruction theory, e.g you can use it to determine if a representation $\pi_1X\to SO(n)$ lifts to $Spin(n)$ by asking the same thing about the map $X\to BSO(n)^d$ and the fibration $BSpin(n)^d\to BSO(n)^d$.  
A: For an abelian structure group $A$, principal $A$-bundles over a smooth manifold $M$ can be described completely in terms of their holonomy functionals $f: LM \to A$.
Here, $LM$ is the thin loop space whose elements are homotopy classes of loops, with the rank of the homotopies bounded by one. A map $f:LM \to A$ is by definition smooth, if its pullback to the ordinary loop space is smooth (in the Fréchet sense).
Definition. A fusion map is a smooth map $f: LM \to A$ such that for every triple $(\gamma_1,\gamma_2,\gamma_3)$ of paths in $M$,  with a common initial point and a common end point, and each path is smoothly composable with the inverse of each other, the map satisfies
$$
f(\overline{\gamma_2} \star \gamma_1) \cdot f(\overline{\gamma_3} \star \gamma_2) = f(\overline{\gamma_3} \star \gamma_1).
$$
Theorem.


*

*The group of isomorphism classes of principal $A$-bundles with connection over $M$ is isomorphic to the group of fusion maps. 

*The group of isomorphism classes of principal $A$-bundles with flat connection over $M$ is isomorphic to the group of locally constant fusion maps.

*The group of isomorphism classes of principal $A$-bundles over $M$ is isomorphic to the group of homotopy classes of fusion maps (where the homotopies are smooth and go through fusion maps).
Parts 1 and 2 are a theorem of J. Barrett, proved in "Holonomy and Path Structures in General Relativity and Yand-Mills Theory". Part 3 is in my paper "Transgression to Loop Spaces and its Inverse I". 
Corollary.
Two principal $A$-bundles with connection (no matter if flat or not) are isomorphic as bundles, if and only if their holonomy functionals are homotopic in the sense of 3.
The non-abelian case should be similiar. In fact, Barrett's result is valid for non-abelian groups. 
A: Let me discuss a variant of the question, where I work in the holomorphic, or algebraic, category; I'm not sure off the top of my head how close it is to the original question.
Suppose that $S$ in fact has the structure of an algebraic curve; or (what is the same) as a Riemann surface.
Then the Riemann--Hilbert correspondence says that monodromy representations (which is the algebraic geometers word for what in the question
are called holonomy reprsentations) $\pi_1(S) \to GL_n(\mathbb C)$ correspond to holomorphic vector bundles $\mathcal E$ on $S$ equipped with a holomorphic flat connection.  My impression
is that it is then not so easy to determine the isomorphism class of $\mathcal E$ as a holomorphic bundle, given the data of the monodromy representation.    I don't know references
for this, but I know there are other people reading MO who do; perhaps one of them will chime in.
My impression in the original question is that one is working in the smooth category, rather than the holomorphic/algebraic category, and then the equivalence class of $\mathcal E$ is
a much coarser invariant, I guess.  In his answer, Igor Belegradek gives a sufficient condition for the bundles to be isomorphic (lying in the same path-component of the representation variety); I wonder how close this is to being necessary?
