Why are bare mass terms for W-bosons forbidden, but coupling terms to Higgs doublets allowed? 
*

*The $W$ bosons live in the adjoint rep of $SU(2)$, which is three dimensional. 

*The standard model Higgs lives in a $SU(2)$ doublet, i.e. the two dimensional rep. 


The $W$ bosons get their mass after symmetry breaking, i.e. when some Higgs component gets a vev, from a kinetic term for the Higgs. Schematic
$$ (W H)^\dagger (WH) \rightarrow v^2 WW $$
 or written in terms of their representations
$$  (3\otimes 2 )^\dagger (3 \otimes 2)$$
Why is this term allowed in the Lagrangian, but bare mass terms for the $W$ bosons like
$$ m^2 WW \hat = m^2 (3 \otimes 3)$$ 
forbidden? From a purely group theoretical point of view we have the $SU(2)$ representation decomposition 
$$ 3 \otimes 3 = 1 \oplus \ldots $$
and therefore a bare mass term should be $SU(2)$ invariant. 
 A: Because you are looking only at the so-called global part, i.e. the part of the gauge transformation which resembles a group action.
Recall that the vector bosons transform as
$$
A_\mu \to g A_\mu g^{-1} - (\partial_\mu g) g^{-1}$$
where the first part is the global part of the gauge transformation, which tells you that $A_\mu$ transform in the Adjoint representation (for non-abelian gauge symmetry), while the second part is the intrinsic local part. The second part, what is strictly speaking the gauge invariance, clearly forbids the mass term as you would get non-homogeneous terms like
$$ A^\mu (\partial_\mu g) g^{-1} $$
Now we can ask why the term with the Higgs is allowed. First recall it comes from the covariant derivative
$$(D_\mu H)^\dagger D^\mu H$$
and when jointly transforming both fields you can show that the action is invariant, i.e. there are no surplus non-homogeneous terms.
It is for this same reason why one has to consider $F_{\mu\nu}$ as the kinetic term for $A_\mu$ instead of something like $\partial_\mu A_\nu \partial^\mu A^\nu$, which is also included in $F^2$ but in a way that the non-homogeneous term cancels (antisymmetric nature of the indices $\mu, \nu$, to be more exact).
Bottom-line: It is not suffice to write down group invariants if the symmetry is local. There is a non-homogeneous part of the transformation when acting on the vector bosons. This intrinsic gauge invariance further constraints how one can write down Lagrangians.
NOTE: My notation is simplistic, I am assuming that $A_\mu \simeq A^a_\mu T^a$ where $T^a$ are the Lie algebra generators, up to some normalisation and conventions.
References:
The vast majority of books on the Standard Model and Quantum Field Theory will use similar arguments and notation.
