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(g1)+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})$?

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 NarasimhanSeshadri) I am more familiar with the specific scenario of the moduli space of flat or antiselfdual 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. 

