We present a unified approach to three different topics in a general Riemannian setting: splitting theorems, symmetry results and overdetermined elliptic problems. By the existence of a stable solution to the semilinear equation $-Du = f(u)$ on a Riemannian manifold with non-negative Ricci curvature, we are able to classify both the solution and the manifold. We also discuss the classification of monotone solutions (with respect to the direction of some Killing vector field), in the spirit of a conjecture of De Giorgi, and the rigidity features for overdetermined elliptic problems on submanifolds with boundary