This question is inspired by a statement of Atiyah's in "Geometry and Physics of Knots" on page 24 (chapter 3 - Non-abelian moduli spaces).

Here he says that for a Riemann surface $\Sigma$ the first cohomology $H^1(\Sigma,U(1))$, where $U(1)$ is just complex numbers of norm 1, parametrizes homomorphisms $$\pi_{1}(\Sigma)\to U(1).$$

This is fine by me, after all by Brown Representability we know $$H^1(\Sigma,G)\cong [\Sigma,BG]=[B\pi_{1}\Sigma,BG]$$ since we know that Riemann surfaces are $K(\pi_{1},1)$s. We then use the handy fact from Hatcher Prop. 1B.9 (pg 90) that shows that...

For $X$ a connected CW complex and $Y$ a $K(G,1)$ every homomorphism $\pi_1(X,x_0)\to\pi_1(Y,y_0)$ is induced by a map $(X,x_0)\to(Y,y_0)$ that is unique up to homotopy fixing $x_0$.

So group homomorphisms $\pi_{1}(\Sigma)\to U(1)$ correspond on the nose with first cohomology of the $\Sigma$ with coefficients in $U(1)$.

EDIT: To be accurate the Hatcher result shows we have an injection of group homomorphisms into homotopy classes of maps. Does anyone know if every homotopy class of maps is realized by a group homomorphism?

What bothers me is what comes next. Now replace $U(1)$ with $G$ - any compact simply connected Lie group, take $G=SU(n)$ for example. Now Atiyah claims that $H^1(\Sigma,G)$ parametrizes **conjugacy classes** of homomorphisms $\pi_{1}(\Sigma)\to G$.

Now if the fundamental group or the Lie group were abelian this would be the same statement, but higher genus Riemann surfaces (genus greater than 1) have non-abelian fundamental groups and Atiyah is looking specifically at non-abelian $G$. Also, it seems that the statement of Brown Representability requires abelian coefficient groups, so I am stuck.

Does anyone know a clean way of proving Atiyah's claim?

EDIT2: I renamed the question to draw in the "right" people. I think the answer has to do with the fact that principal G-bundles over a Riemann surface are determined by maps of $\pi_1(\Sigma)\to G$ (can someone explain why?). This is related to local systems and/or flat connections, which I don't understand well. Thanks!

basedhomotopy classes, and conjugacy classes of homomorphisms if you takeunbasedhomotopy classes. $\endgroup$