The light comes on when oil pressure is low. This is normally the result of a low oil level. The only way the system can determine is the level is low is for you to start the engine, which may not be a good thing if the level is low.
A worn oil pump can also lead to the light coming on, especially at higher rpm as the pump is unable to supply the correct pressure.
If the light stays on when the bike's idling just having started it, I'd say there is a problem.
Check that the oil pressure switch is not the culprit by fitting a new one. If symptoms persist and you've confirmed that the oil level is okay by visually checking the sight glass, then you have a problem.
I prefer to think of oil lights as "imminent engine death lights" if you persist in running the engine....