Counting electrons
When drawing molecules, an important first step is to first count the total valence electrons (electrons in the outer shell) in the molecule. Sulfur has 6 valence electrons, each oxygen has 6 valence electrons, and the 2- charge indicates there are 2 additional electrons. This comes out to be a total of 32 electrons.
Drawing the molecule
The next step is to draw the general shape of the molecule. In this case, sulfur is the central atom and 4 oxygens surround it, so draw a sulfur atom labelled as S with 4 oxygens equally spaced around it.
Next, you want to fill in the bonds between each oxygen to the sulfur atom. This will be a total of 4 bonds.
Now, count the number of electrons used. 4 bonds consisting of 2 shared electrons each is 8 electrons. We have 24 electrons left.
Add these remaining 24 electrons to the surrounding oxygens in pairs of 2, making sure that no atom has more than 8 electrons around it (1 bond and 3 pairs).
This is one possible structure of SO4 2-, but it is not the most common one.
Formal charge of each atom in a molecule is calculated by taking the normal amount of valence electrons, in sulfur for example, 6, and subtracting it by the total amount of non-bonding electrons and the amount of bonds. In this case in the structure we just drew above, the formal charge is 6-4=2, where 4 is the amount of bonds to sulfur.
FC=V−N−B/2
this is the equation for formal charge. V is the valence electrons of the atom in its ground state, or when it is not bonded to anything else. N is the number of non-bonding, or loose, electrons around the atom in the molecule. B is the number of electrons that are in bonds.
All atoms in a molecule want to have a formal charge as close to zero as possible, and this is a rare case where sulfur can be an exception to the octet rule and have more than 8 valence electron in order to satisfy this need.
Therefore, in this case, 2 of the single bonds around sulfur can be replaced by double bonds, so that the formal charge is 6-6=0. So, for two of the oxygens, remove one pair of electrons and turn them into bonds with sulfur.
There are several different places you can add these double bonds, which lead to structures called resonant structures. Resonant structures have the same number of non bonding electrons and bonds, but the single and double bonds are in different places.
The attached image is just one resonant structure, but keep in mind there are other possible very similar structures-- for example, the double bonds could be opposite of each other.
These structures are more common as they have the lowest formal charge on the central atom, sulfur.