The oil light may come on for a variety of reasons, typically this is due to there not being enough oil in the system, reasons for this could include; oil pump failure, failure of the oil pressure sensor, or a blockage in the oil system.
If the light comes on when at speed, do your best to pull off the road quickly and safely and turn the engine off as soon as possible. Continued operation of the engine with low oil pressure can cause serious damage to the engine.