This might be the worst of the worst fears. You change your oil before a long road trip. You get off the highway and tooling around the neighborhood, there goes your oil light when idling at a stop sign. Kill the car and restart it, and all seems well for a few minutes and there it is again. Get out, check the oil which is full, and wonder what the heck is going on. Assume the new oil filter must have been bad and change the filter, only to end up with the same intermittent oil light. Well, I shouldn’t say intermittent, because it happens at low RPM and at high engine temperature, the same preconditions that would give you low oil pressure if you had a weak oil pump or excessive bearing clearance.
Well before you start fearing the worst, if you are sure the oil level is fine, the oil is not contaminated and that there can be nothing wrong with the filter, the next place to look is the oil pressure switch that sends the signal to the oil light. The way the switch works is that oil pushes on it until it turns off. Sufficient push on the “inside” of the switch from high oil pressure will turn off the light, while insufficient push from low oil pressure will allow it to remain on. Well, if the pressure switch is dripping oil from the plug side, that is your first sign something is wrong with it. The diaphragm internal to the switch is supposed to keep the oil on the engine side. If the oil gets through onto the electrical side, it will foul the connectors and give an intermittent connection. Coincidentally, the conditions for the oil getting through the diaphragm into the plug are the same as those that would give you an oil light on a tired engine: fresh oil and a hot engine at idle. Also, when the diaphragm begins to leak, that means that some of the pressure on the engine side is escaping through the diaphragm instead of pushing on it, meaning that the oil pressure will be sensed consistently lower than its actual value, and so the oil light will come on at times when the real pressure is actually fine.
The fix is to replace the switch. It costs 12 bucks at a parts store. You need a 1 1/16 inch deep socket to remove the old sender and install the new one. If the new sender did not come with teflon or similar sealer on the threads, use appropriate plumbing thread sealer before installing. Also, clean out the electrical plug with solvent and blow clear with compressed air to clear any oil from it that might foul the connection.