The oil light illuminates primarily because of one of two reasons - either low oil pressure or a malfunctioning pressure sensing unit.
Oil pressure within a sealed/semi-sealed system (such as an engine block) is dependant on a number of things, one of which is the viscosity of the fluid being used. Most oils in-use today (whether standard-refined or synthetically-refined) are multi-vicosity oils designed be 'year-round' oils. For example, a 10W-30 oil acts like (has the viscosity of) a 10-weight oil during winter, and a 30-weight oil during the summer.
As viscosity increases, the ability of the oil to "flow" decreases, which changes with temperature. And as the temperature of the oil increases, so does it's viscosity. Thus a lower-weight oil flows more freely at the same temperature, and warmer oil flows more freely that cold oil of the same "weight". The fact that an oil 'acts' like a 10-weight oil during the winter makes for easier engine starts when the oil is cold (less viscous), and like a 30-weight oil when internal engine temperatures are high to help protect the engine against wear without the need to change oil as the seasons change.
Prior to synthetic oils, racers primarily ran high-vicosity oils that were high in zinc. Back in the day, most ran Valvoline 20W-50 racing oil. The general consensus then was, that the added protection was worth the minimal loss in horsepower from running heavier-weight oil. Synthetics changed that way of thinking.
So, did the 10W-20 oil "cause" the oil-light flicker - no - the internal engine wear and resulting loss in oil pressure, is what most-likely caused the light. Did it contribute to it "illuminating" - possibly yes, if the engine's oil pressure was borderline to begin with. Remember that "idiot" lights only tell you when the system that's being monitor crosses some threshold - in this case when the oil pressure falls below 6 PSI (pretty low).
Did it damage the engine - that's dependant upon what you were doing at the time. Could it be that the oil pressure sensor is not working properly - yes, but just as it could be reading low (giving a "false" low pressure light), it might also be reading high, which would not be good. That's why you see many people running mechanical oil pressure gauges.
The best way to tell, is to install a mechanical oil pressure gauge and see what pressure you're getting. If you absolutely must drive the car, run a 10W-40 oil until the problem can be addressed, realizing that you're playing russian-roulette every time you drive the car, every minute it is running. Don't get-into it, speed-shift, or tach it out - unless you're looking for a reason to have to rebuild it . . . .