The intermittent nature of the light makes it even more concerning. It might be indicating a failing oil pressure sensor, but it could also mean fluctuating oil pressure itself, stemming from a more serious underlying issue like a failing oil pump, worn bearings, or a leak.
Get the vehicle checked by a mechanic immediately. Continuing to drive it risks severe and irreversible engine damage.