I'm probably missing something obvious, but I've been wondering what the motivation is for requiring the components $A_\mu$ in a local trivialization of a gauge connection on a smooth principal $G$bundle to lie in $\mathfrak{g}$, the Lie algebra of $G$. I can see that this gives a couple of nice properties; for example, in a local trivialization it ensures that under a gauge transformation $A'_\mu=gA_\mu g^{1}+g\partial_\mu g$ lies in $\mathfrak{g}$, and that the curvature form $F=dA+A\wedge A$ lies in $\mathfrak{g}$ (since $\mathfrak{g}$ is closed under the Lie bracket). But is there a more intrinsic or geometric reason that $A_\mu$ must be in $\mathfrak{g}$? Thanks.

$\begingroup$ This follows from the definition of a connection on a principal Gbundle. $\endgroup$ – Mariano SuárezÁlvarez Jan 18 '10 at 23:05

$\begingroup$ Yes, but I guess I'm asking what the reason/motivation is for including it in the definition. $\endgroup$ – Matthew Dodelson Jan 18 '10 at 23:08
First, I never liked working with principal bundles; vector bundles seem easier and more natural to me. Second, I never like thinking about abstract principal $G$bundles. I prefer fixing a representation of $G$ and viewing the principal $G$ bundle as a reduced frame bundle associated with a vector bundle.
So let $E$ be a rank $k$ vector bundle and $F$ the bundle of arbitrary frames in $E$ (this is a principal $GL(k)$bundle). Then $GL(k)$ acts on the right on $F$. Given a subgroup $G$ in $GL(k)$, let $F_G$ be a subbundle of $F$ such that if $f \in F_G$, then so is $f\cdot g$ for each $g \in G$.
The primary example is $E = T_*M$ and $F_G$ is the bundle of orthonormal bases of the tangent space with respect to a Riemannian metric.
What is the critical property we want a $G$connection to satisfy? Well, any connection allows you to parallel translate an arbitrary frame $f \in F$ along a curve. We'd like the $G$connection to be such that if $f \in F_G$, then the parallel translation remains in $F_G$. This leads to the right definition of a $G$connection.

$\begingroup$ Exactly what I was looking for. Thanks! $\endgroup$ – Matthew Dodelson Jan 18 '10 at 23:37

1$\begingroup$ Note that we also want $F_G$ to be $G$equivariant, since rotating a thing (internally) and parallel transporting a thing should commute. You only get this if $A$ transforms like $g^{1} A g + g^{1} dg$ under change of gauge / gluing maps. $\endgroup$ – Matt Noonan Jan 19 '10 at 0:24
I always find it helpful to think about Cartan geometries first  they are less "abstract" than principal bundles and shed new light on things like Riemannian geometry.
For a nice introduction see
http://www.emis.de/journals/SIGMA/2009/080/sigma09080.pdf
(look for the hamster on page 4!)
or the following nice book
http://www.amazon.com/DifferentialGeometryGeneralizationErlangenMathematics/dp/0387947329
As Mariano points out in his comment, this follows from the definition of a connection on a principle $G$bundle $\pi: P \to M$.
At every $p \in P$, the kernel of $\pi_* : T_pP \to T_{\pi(p)}M$ defines the vertical subspace of $T_pP$. Let's call it $V_p$. It is spanned by the fundamental vector fields of the $G$action on $P$. Since this action is free, the fibres are principal homogeneous spaces and hence $V_p$ is isomorphic to the Lie algebra $\mathfrak{g}$. A connection (à la Ehresmann) is an equivariant choice of horizontal subspace $H_p$ complementary to $V_p$. Hence it can be defined as the kernel of a 1form $\theta$ with values in the adjoint representation of $G$ (from equivariance of the horizontal subspace).
The gauge field in your question is then the pullback via a local section of that connection 1form. Hence locally it is a 1form on $M$ with values in the Lie algebra $\mathfrak{g}$.
So the reason the gauge field is $\mathfrak{g}$valued is the equivariance of the of the connection (in the sense of Ehresmann).
If you then ask why one imposes equivariance, one answer is that it is the natural condition in this context, but perhaps someone else has a more convincing reason.

$\begingroup$ I think the connection form $\theta$ does not libe in the bundle of the adjoint representation of $G:$ To see this, note that the vertical bundle $V=\ker d\pi$ I canonically isomorphic to $M\times g.$ A (gerneralized connection is (as you said) an complementary bundle $H\subset TP$ of $V.$ Thus, any complementary bundle is the kernel of the corresponding projection onto $V,$ forgetting about the $M$ part gives you a welldefined 1form $\theta$ on $P$ with values in $g.$ $\endgroup$ – Sebastian Mar 18 '10 at 8:30
I'm not sure about the mathematical origins, but the original physical motivation was Yang and Mills's attempt to deal with the approximate SU(2)symmetry of nucleons (protons and neutrons). The big step was (as I understand it) when GellMann (and Ne'eman, independently at about the same time) realized that a diagram labeling experimentally observed particles was the weight diagram for SU(3). He made some predictions at a conference:
following the presentation on Strong interactions of strange particles by G. A. Snow, both Ne'eman and GellMann raised their hands to ask for permission to speak. The chairman called GellMann, who was the more eminent physicist of both, and GellMann announced that "[...] we should look for the last particle called, say, Ω, with S=3, I=0. [Here, I is isospin.] At 1685 MeV it would be metastable and should decay by weak interaction [...]"
and the rest was the eightfold way.
Of course, principal $G$bundles and the connections on them had been around for quite some time before (Simons famously pointed this fact out to Yang later on).