Sulfonation of benzene:
Protonation of an OH group produces a protonated intermediate (I). Because the oxygen gains a positive charge it turns into a good leaving group and water is lost from the intermediate to provide sulfur trioxide. Even though sulfur trioxide has no positive charge, it is a strong electrophile. This is since the sulfur atom is bonded to 3 electronegative oxygen atoms that are all 'pulling' electrons from the sulfur, and creating it electron deficient (that is electrophilic). Throughout electrophilic substitution, the aromatic ring creates a bond to sulfur and one of the π bonds among the sulfur and oxygen is broken. Both electrons move to the more electronegative oxygen to create a third lone pair and generate a negative charge on that oxygen. This will lastly be neutralized while the third lone pair of electrons is employed to create a bond to a proton.
Figure: Sulfonation of benzene.
In nitration, sulfuric acid acts as an acid catalyst for the creation of a nitronium ion (NO2+ ) that is generated from nitric acid through a very similar mechanism to that employed in the generation of sulfur trioxide from sulfuric acid.
Figure: Generation of the nitronium ion.