Identifying $T^* \mathrm{Bun}_G$ with Higgs bundles Let $G$ be a semisimple algebraic group, $C$ be a smooth projective curve, and $\omega$ be the canonical line bundle.
The stack $\mathrm{Higgs}_{\omega}$ is defined as the stack associating to each $S$ the groupoid consisting of $(E, \phi)$, where $E$ is a $G$-torsor over $X \times S$ and $\phi \in \Gamma(C \times S, \operatorname{ad}(E) \otimes_C D)$. Here, how, given this torsor $E$ on $C \times S$, does $\operatorname{ad}(E)$ refer to the associated bundle $E \times_G \mathfrak{g}$?
Main question: Given a stack $X$, one can abstractly define its co-tangent stack. How does one show that the abstract definition of $T^* \mathrm{Bun}_G$ can be identified with $\mathrm{Higgs}_{\omega}$?
 A: The tangent complex to $\operatorname{Bun}_G(C)$ can be identified with $T_{\operatorname{Bun}_G(C)}=\mathbf{R}\pi_*{\operatorname{ad} P[1]}$, where $\pi:\operatorname{Bun}_G(C)\times C\rightarrow \operatorname{Bun}_G(C)$ is the natural projection and $P$ is the universal bundle.
Then the cotangent stack is $T^*{\operatorname{Bun}_G(C)} = \operatorname{Spec} \operatorname{Sym} (T_{\operatorname{Bun}_G(C)})$. Maps from $U$ into the total space of the bundle $T^*{\operatorname{Bun}_G(C)}\rightarrow \operatorname{Bun}_G(C)$ are the same as maps $U\rightarrow \operatorname{Bun}_G(C)$ together with a section of the dual sheaf of $T_{\operatorname{Bun}_G(C)}$. Relative Serre duality identifies $\mathcal{Hom}(T_{\operatorname{Bun}_G(C)}, \mathcal{O})$ with $\mathbf{R}\pi_*\mathcal{Hom}(\operatorname{ad} P, \omega_C)\cong\mathbf{R}\pi_*(\operatorname{ad} P\otimes\omega_C)$ using the Killing form.
So, maps $U\rightarrow H^0(T^*{\operatorname{Bun}_G(C)})$ to the underlying ordinary stack are identified with $G$-bundles over $U\times C$ and a section $\phi\in H^0(U\times C, \operatorname{ad} P\otimes \omega_C)$.
A: $\newcommand\leftnamed[1]{\ \stackrel{#1}\longleftarrow\ }\newcommand\rightnamed[1]{\ \stackrel{#1}\longrightarrow\ }$I meant to leave this as a comment to add to Pavel's excellent answer, answering Vinoth's first question in the comments, but it was too long.

Why is the tangent complex of $\operatorname{Bun}_G(X)$ equal to $\pi_*{\operatorname{ad}P[1]}$? Well, for a mapping stack we have
$$Y \leftnamed a X\times\operatorname{Map}(X,Y) \rightnamed b \operatorname{Map}(X,Y)$$
and its mapping stack is $\mathbf{T}_{\operatorname{Map}(X,Y)}=b_*a^*\mathbf{T}_Y$.† Apply this to our case $\operatorname{Bun}_G(X)=\operatorname{Map}(X,BG)$:
$$BG\ \stackrel{a}{\longleftarrow}\ X\times\text{Bun}_G(X)\ \stackrel{\pi}{\longrightarrow}\ \text{Bun}_G(X).$$
The tangent complex of classifying space is $\mathbf{T}_{BG}=\mathfrak{g}[1]$ concentrated in degree one. This follows from the distinguished triangle of $\mathbf{T}$ for the composition
$$* \rightnamed{} BG \rightnamed{} *$$
Note that this is just $\operatorname{ad}\gamma[1]$, where $\gamma=*\to BG$ is the tautological bundle. Next, the tautological bundle $P$ is defined to be the pullback
$\require{AMScd}$
\begin{CD}
P @>>> *\\
@V  V V@VV  V\\
X\times\operatorname{Bun}_G(X) @> a>> BG
\end{CD}
so $a^*\mathbf{T}_{BG}=\operatorname{ad}P[1]$ definitionally. Pushing forward by $\pi_*$ we are done.

†See Toen's "Derived Algebraic Geometry and Deformation Quantization".
