For more than you'd ever want to know about the fuel systems in a modern airliner, see http://www.b737.org.uk/fuel.htm
They aren't. On light aircraft, the only thing they're good for is as a double check on a manual fuel reading (using a dipstick) or a time-based calculation, and to confirm during flight that the fuel cap wasn't left off. Beyond that, the needles bounce around so much during flight the only thing you can really verify is "yes there's some liquid there; somewhere between empty and full".
Many light aircraft owners have since retrofitted "fuel totalizers" which measure fuel consumption, and are manually reset by the pilot to a dipstick value when fuel is added. My group aircraft's fuel totalizer seems accurate to within at least about 10%. It can be calibrated better, but manual dipstick readings are only accurate to a couple of gallons anyway.
However, one key difference is that I do know, to within about half an hour, my fuel endurance before departure. I'd want the same from a battery.
I initially read this comment thinking you meant floating-point based...
My 1990 Toyota never read full. The buffer on the fuel sender was so extreme that by the time the needle made it to the "F" I had already burned 1/8 of a tank! My current car warns me when I have about 50 miles of fuel left, I wonder how much historical data it uses in that calculation.
None of my motorcycles even have fuel gauges. I just keep an eye on the odometer and when I stop to stretch my legs I give the tank a shake or a peek.