Tangent space of a Moduli space Let $X$ be a compact Riemann surface with genus $2$ and $M^2$ the moduli space of stable principal $SL(2)$-bundles of rank $r$. We know that $M^2$ is a complex projective variety of dimention $r^2(g-1)+1=r^2+1$. I have to prove that if $p \in M^2$ is a smooth point then $T_pM^2 \simeq H^1(X,\mathfrak{sl}(2))$. With $\mathfrak{sl}(2)$ we mean the adjoint bundle. I suppose that $H^1(X,\mathfrak{sl}(2))$ is the sheaf cohomology with coefficients the holomorphic sections of $\mathfrak{sl}(2)$ and they can be regarded as an infinite dimentional Lie algebra. How can I prove the isomorphism $T_pM^2 \simeq H^1(X,\mathfrak{sl}(2))$? If I have $M$ the moduli space of stable principal $G$-bundles ($G$ is a simple Lie group) over a compact Riemann surface $X$, how can I prove, in general setting, that $T_pM \simeq H^1(X,\mathfrak{g})$?
 A: This is the general method of deformation theory. The two immediate papers that will give you sufficient detail are:
Holomorphic Vector Bundles on a Compact Riemann Surface (by Narasimhan-Seshadri)
Stable Principal Bundles on a Compact Riemann Surface (by Ramanathan)
I am more familiar with the specific scenario of the moduli space of flat or anti-self-dual connections on a principal bundle, where everything is translated into an elliptic chain complex, and the Zariski tangent space is the kernel of the linearization of some operator modulo the infinitesimal action.
A: Use a Riemann-Hilbert type correspondence: {Flat $G$-bundles} ~ { $\pi_1$-reps into $G$} (upto some stuff on each side). Now a tangent vector to the moduli space will be an infinitesimal deformation of the representation. If you work out what this means, then you will find an $H^1$ appearing in group cohomology with coefficients in $\frak{g}$. Equivalently, since curves are $K(\pi,1)$'s you can see this using adjoint bundles.
See, e.g., Hitchin's Flat Connections and Geometric Quantization. Also Labourie has some notes on surfaces. Much of this is found in there as well.
