It it comes on at random times, it could be a wiring problem or a bad ground causing it.
If you remove the gauge by pulling it upwards with some force but not twisting it at all, use a rocking motion, the gauge will come out of the tank to inspect the connections underneath it.
Make sure they are clean and tight and check under the tank where the wires pass through below the gauge to see if they are clean and tight there also.
Last possibility is a bad bulb filament in the gauge.