In this paper we provide some local and global splitting results on complete Riemannian manifolds with nonnegative Ricci curvature. We achieve the splitting through the analysis of some pointwise inequalities of Modica type which hold true for every bounded solution to a semilinear Poisson equation. More precisely, we prove that the existence of a nonconstant bounded solution $u$ for which one of the previous inequalities becomes an equality at some point leads to the splitting results as well as to a classification of such a solution $u$.