This object is an algebraic invariant of the presentation 2-complex $Z$ of the finite presentation $\langle X\mid R\rangle$ of the group $G$ you are considering.
$Z$ is a finite 2-complex, and to obtain the above invariant you form the (augmented) cellular chain complex of the universal cover $\tilde{Z}$ of $Z$ with $\mathbb{Z}G$ action induced by the monodromy action of $\pi_1(Z)\cong G$ on $\tilde{Z}$.
$$…\to C_3(\tilde{Z})\to C_2(\tilde{Z})\to C_1(\tilde{Z})\to C_0(\tilde{Z})\to \mathbb{Z}\to 0$$
Now, as $Z$ has dimension 2 as CW-complex, $\tilde{Z}$ inherits the structure of a dim 2 CW-complex, so the free $\mathbb{Z}G$-modules $C_i(\tilde{Z})$ vanish for $i>2$. Note that this gives us the exact sequence you want but with the second homology module $ker(\partial_2: C_2( \tilde{Z})\to C_1(\tilde{Z}))=H_2(\tilde{Z})$ in place of $\pi_2(Z)$ (as each $C_i(\tilde{Z})$ for $i=0,1,2$ is a $\mathbb{Z}G$-module of rank the number of i-cells in $Z$, which is precisely $1,|X|, |R|$ respectively). But $H_2(\tilde{Z})$ and $\pi_2(Z)$ coincide by the fact that $\tilde{Z}$ is simply connected, so it’s second homology and homotopy modules are isomorphic by Hurewicz isomorphism, and then higher homotopy groups are invariant under covering spaces, so $\pi_2(\tilde{Z})\cong \pi_2(Z)$.
This object is a homotopy invariant of $Z$ (after fixing an identification of $G$ with $\pi_1(Z)$). A good resource for this topic is ‘2-dimensional homotopy theory and combinatorial group theory’, but unfortunately I don’t have an online copy I can link to. Please let me know if there are any points you would like me to expand on.