Oil does thin as it gets hotter. I have also seen switches get weak and come on even when there is adequate oil pressure. This happened to my YM2500, and changing the switch solved the problem. The tried and true method is to get the oil pressure specs for the engine, remove the sending unit, and screw in a dial type oil pressure guage so you can read the pressure directly. If the pressure is indeed low, I would change the oil and filter first. Oil should be changed more frequently in hot weather. If more than 50 hours since the oil was changed, it may have lost some of its viscosity. In some cases a partially plugged oil filter can cause this. If that does not solve the problem, drop the oil pan and check the pickup tube screen. After you have checked the simple things, it could be the oil pump or worn engine bearings.
If the oil pressure isn't low, check the electrical.
I have never worked on a 1700, but all the other Yanmars I have seen use a switched ground for the oil light. Assuming this is the case here, When you turn on the key, 12 volt positive is applied to the light. The oil pressure sending unit is a normally closed switch which completes the circuit by grounding. It closes on falling pressure, opens on rising pressure. When the oil pressure reaches the switch point, the switch opens and the light goes off. If the wire that goes from the lamp to the switch has broken insulation and grounds it will turn the light on.To check the wiring for a short: With the engine off, unplug the wire from the sending unit. Turn the key on. The light should be off. Move the wire around as someone is watching the light. If it comes on, look for bad insulation. If the wire is good, replace the switch.
Hope this helps.
Mike