This can be seen using obstruction theory.
Therefore consider the Whitehead tower of BG:
$$ EG \to ... \to BG\langle3\rangle\to BG\langle2\rangle \to BG\langle1\rangle \to BG $$
Now a $G$ bundle over $M$ is classified by a map $f: M \to BG$. The bundle is trivial iff we can lift $f$ to a map $M \to EG$. Since the fibres in the Whitehead tower are Eilenberg-MacLane spaces we can write down the obstruction to lift $f$ successively through the $BG\langle n\rangle$'s:
-Obstruction against lift to $BG\langle 1\rangle$ lies in $H^1(M,\pi_0(G))$
-Obstruction against lift to $BG\langle2\rangle$ then lies in $H^2(M,\pi_1(G))$
-Obstruction against lift to $BG\langle3\rangle$ then lies in $H^3(M,\pi_2(G))$, etc...
In your case $\pi_0(G) = 0$ and therefore the first obstruction vanishes. On the 1-skeleton all the higher obstructions vanish for dimensional reasons, thus all bundles are trivial.
If you moreover assume that $G$ is simply connected and finite dimensional (e.g. SU$(n)$, Spin$(n)$,...) then also $\pi_2(G) =0$. Hence there are no non-trivial $G$-bundles over manifolds or cell complexes of dimension $\leq 3$.