gauge groups are in general connected to symmetries under those transformations (gauge transformations).
One can recall from a quantum mechanic course, that the wavefunctions that are connected by an overall phase are equivalent, which means that either you use \psi (x) or e^{ia} \psi (x) with a \in R, you get the same information from the wavefunction. This is a global U(1) "rotation" symmetry. The photon field A_\mu is also arbitrary up to a gauge transformation (known from electrodynamics) where you know that you can choose gauges on which to work (eg, Lorentz gauge, Coulomb gauge, and a whole set of gauge families).
That's a general idea someone has from known (before QFT) physics. The general idea is then given by the fact that you want to make symmetric objects under gauge groups, and that's how one can start building the Lagrangians needed for the field theory.
In general, in most introductions to QFT, one tries to create a fermionic theory (Dirac Lagrangian) obey a local U(1) transformation, local stands for the fact that the transformation parameter a I used above can depend on the spacetime position a \rightarrow a(x). This eventually lead to the reproduction of "electromagnetic" theory, with A_\mu the photon field playing the role of the connection (knowing some GR can help you see some analogies with SR to GR and the introduction of the connection there, with \eta _{\mu \nu} \rightarrow g_{\mu \nu} (x)).
Gauge transformation for example is the reason the photon has one less physical degree of freedom than working in any other gauge (choosing a particular equivalent gauge, you can kill one component). If you don't set a specific gauge, you are going to reproduce more (unphysical) degrees of freedom for the photons (sometimes called Faddeev Popov Ghosts). These objects will only contribute in internal loops and not as final assymptotic states [that's why they are unphysical].
For SU(3) now, I suppose you ask for the flavor representations (of up, down and strange quarks) you have the representation 3 and \bar{3}, from combinations of these representations you can have the rest irreducible representations. The 3 is a three-dimensional representation, the basis vectors are then the quarks u,d,s...
For example 3 \otimes 3 = 6 \oplus \bar{3} and 3 \otimes \bar{3} = 8 \oplus 1. The last means that the quarks (uds) and their antiquarks, can form an 8 dimensional represention (the octatet of mesons) and a singlet (that's the \eta' meson).
And then you can have the
3 \otimes 3 \otimes 3 = 3 \otimes (6 \oplus \bar{3} ) = (3 \otimes 6) \oplus (3 \otimes \bar{3})= 10 \oplus \bar{8} \oplus 8 \oplus 1.
The 3 \otimes 3 \otimes 3 which means the combination of 3 quarks of different flavors, can be decomposed to the irreducible representations of dimension 10, 8 (and its conjugate) and a singlet representation. These corresponds to the hadron 10plet,8plets and singlets.
In general the SU(3) flavor is an approximate symmetry, which is broken because of the differences in the quark masses.
The Young tableaux can help you see the combinations applicable for these sets of n-plets.
The more appropriate symmetry, the one that is used in QCD, is the SU(3)_{color} where instead of having quarks (u,d,s), you have colors (R,G,B). This symmetry is also broken at low energies (because of non-perturbative QCD effects, which are dealt in general by lattice QCD). In the Lagrangian language you are looking for objects that don't change under the symmetry transformations. These objects are combinations of 3 (colors) and \bar{3} (anticolors) that contain the singlet (singlets don't change under symmetry transformations, since they can be considered "scalar" quantities). From the above you've seen that 3 \otimes \bar{3} contains the singlet, as well as 3 \otimes 3 \otimes 3. So if you take a field which belongs in 3 you can either combine it with 2 other same objects or with 1 existing in \bar{3}. That way you can have lagrangians that don't change under SU(3) color, and this gauge symmetry is a symmetry of your problem.