Characterization of rings and modules with Serre condition (Sn)