In SO2 the oxidation state of sulphur is +4, it can lose its two more electron to attain +6 oxidation state. Moreover it can gain electrons to reach the oxidation state of -2 (lowest oxidation state observed in its compound). Since it has a capability to lose and gain electron therefore it acts as oxidizing as well as reducing agents.