Oxygen being smaller in size than sulfur, has its valence shell electrons placed more closely than sulfur. ... As an external electron is introduced, energy is released (which is called electron affinity) but at the same time, some of the energy is consumed due to the instability caused by electron-electron repulsion.
This is likely due to second period elements' being quite small, so electron-electron repulsion is much more significant than in a third period element. The general trend is that EA is more positive as you move down the periodic table since effective nuclear charge is the same, but the electrons are farther away from the nucleus.