We first state Papakyriakopoulos-Whitehead Sphere Theorem and then use it to prove the following:
Let $M$ be a connected, orientable, compact $3$-manifold without boundary. Then $\pi_2(M)=0$ if and only if $M$ is irreducible.
To prove the above we also need to use Poincaré Conjecture (proven by Perelman), which says that
Each simply-connected, compact $3$-manifold without boundary is homeomorphic to $\Bbb S^3$.
Papakyriakopoulos-Whitehead Sphere Theorem, irreducible $3$-manifold