S atom has six valence electrons out of which 2 remain as lone pair of electrons and 4 are shared with 2 oxygen atoms to form covalent bonds.
Hence, neither an electron is gained nor it is lost. Hence, neither negative nor positive charge is present on S atom.
Hence, the formal charge on S atom in SO2 is zero.