If $A$ is a commutative C*-Algebra then also its representation $\pi(A)$ is commutative, and it's an operator C*-algebra.
A representation is said to be irreducible if $\pi(A)$ does not commute with any nontrivial projection operator.
So if $A$ is commutative in $\pi(A)$ there are no nontrivial projection operators.
Now, if $\pi$ is a representation on a Hibert space $H$ of dimension greater than one it shouldn't be irreducible, but I'm unable to prove it. I don't see how to apply the spectral theorem, like it's suggested in the text I'm reading.
Can you give me a little help please?
It is not necessarily true that $\pi(A)$ will have non-trivial projections. But $\pi(A)''$ will, because it is a von Neumann algebra.
Now, the assertion you are looking at is basically trivial. You want to prove, for $A$ abelian, "if $\dim H\geq2$ then $\pi$ is not irreducible". This is the same as its contrapositive, which is "If $\pi$ is irreducible, then $\dim H=1$". The proof of this is like this: if $\pi$ is irreducible, then $B(H)=\pi(A)''$; then $B(H)$ is abelian, which only happens when $\dim H=1$.
To see that $B(H)$ is not abelian when $\dim H>1$, consider an orthonormal basis $\{e_1,e_2,\ldots\}$ (it doesn't have to be countable) and define two bounded linear opeartors by $$ Se_1=e_2,\ \ Se_j=0\ \text{ if }j\ne2; $$ $$ Te_2=e_1,\ \ Te_j=0\ \text{ if } j\ne 1. $$ Then $STe_1=0$, $TSe_1=Te_2=e_1$. So $TS\ne ST$.