The Oberth effect exists because imparting a fixed change in momentum increases kinetic energy more when traveling at a faster speed than at a slower speed. This is due to the fact that kinetic energy is proportional to the square of velocity. Let's look at an example. Assume your spacecraft has a mass of 1 kg, and you have a rocket engine that can provide a delta V of 1 m/s. If you do the maneuver at 5 m/s, your kinetic energy goes from 5^2=25 J to 6^2=36 J. If you do the maneuver at 10 m/s, your kinetic energy goes from 10^2=100 J to 11^2=121 J. With the same change of 1 m/s, you gain 11 J in one case and 21 J in another case.
For a solar sail, the "propellant" is actually the light from the sun itself. The photons impart a small change in momentum on the spacecraft, as explained in Litho's answer. This phenomenon is referred to as solar radiation pressure.
Regarding the effect of opening solar sails at periapsis and apoapsis, this depends on many factors. First, as you mentioned, the speed at periapsis and apoapsis are different, and therefore you'll spend less time near periapsis than you will near apoapsis. The eccentricity of your orbit will determine the difference in speeds. So depending on how eccentric your orbit is will determine the tradeoff on additional time needed at periapsis versus how much more efficient the periapsis maneuver is. The orientation of your orbit is also important, because if you are in Earth's shadow during periapsis or apoapsis then of course you will not receive any delta V at that point. Similarly, if your line of apsides is in line with the sun, then you won't be able to get much delta V in velocity direction at either apse.