Light illumination occurs when there is no ignition. When first turned on there will be a brief lighting of lamp. When the system senses combustion the light goes out.
If the heater tries to redirect later to warm water again the cycle repeats.
I had a corroded flame sensor. Cleaning helped but only a little while. Replaced and working fine. If in a pinch you can scrape it down with a fingernail file.
Peace and Blessings..