The sharp isoperimetric inequality for non-compact Riemannian manifolds with nonnegative Ricci curvature and Euclidean volume growth has been obtained in increasing generality with different approaches in a number of contributions culminated by Balogh and Kristály (2023) also covering metric-measure spaces satisfying the nonnegative Ricci curvature condition in the synthetic sense of Lott, Sturm and Villani. In sharp contrast with the compact case of positive Ricci curvature, for a large class of spaces including weighted Riemannian manifolds, no complete characterization of the equality cases is present in the literature. The scope of this paper is to settle this problem by proving, in the same generality as Balogh and Kristály (2023), that the equality in the isoperimetric inequality can be attained only by metric balls. Whenever this happens the space is forced, in a measure theoretic sense, to be a cone. Our result applies to different frameworks yielding as corollaries new rigidity results: it extends the rigidity results of Brendle (2023) for weighted Riemannian manifolds and the rigidity results of Antonelli et al. (2023) for general \mathsf{RCD} spaces. It also applies to the Euclidean setting by proving that optimizers in the anisotropic and weighted isoperimetric inequality for Euclidean cones are necessarily the Wulff shapes.