Atomic number of sulfur is 16. The electronic configuration of sulfur (S) can be written as
. So, inorder to reach the stable octet configuration the valence shell tends to accept two electrons to form sulfide, a divalent anion.
This can be represented as,

Therefore, the charge on sulfide ion
is -2 as sulfur atom tries to get a stable octet configuration by accepting two electrons giving a negative charge to the ion formed.