Is there a good place to learn about the structure of **moduli stack** of flat $G$-bundles on an algebraic curve?


Of course, we're just studying representations of a group $\pi\_1(X)\to G$ modulo some conjugation (that's why it should be a stack). Since this is very similar to **Galois representations** in number theory, I wonder if there's a reference that also explains the similarities and differences between the two cases.



Moduli space of flat bundles
You have to be a bit careful here. Over $\mathbb{C}$ the stack of representations of $\pi\_{1}(X)$ in $G$ and the stack of flat algebraic $G$-bundles on $X$ are isomorphic as complex analytic stacks but are *not* isomorphic as algebraic stacks. In fact the algebraic structure on the stack of flat $SL\_{n}(\mathbb{C})$ bundles on $X$ reconstructs the curve $X$, while the stack of representations of $\pi\_{1}(X)$ into $SL\_{n}(\mathbb{C})$ depends only on the genus of $X$ and not on the particular curve $X$.


As for references I suggest you take a look at Carlos Simpson's papers "Moduli of representations of the fundamental group of a smooth projective variety, I and II" which you can find [here](http://archive.numdam.org/article/PMIHES_1994__79__47_0.pdf) and [here](http://archive.numdam.org/article/PMIHES_1994__80__5_0.pdf).


