Low voltage cut-off circuit for li-ion cell.

If you are at the beginner end of things and would prefer to buy a kit instead of doing it completely by yourself, Sparkfun (and presumably others) offers a kit that lights up a LED when the voltage is below a threshold. Instead of the LED, you can hook the output to a digital pin that provides an interrupt (pins 2 and 3 on the Uno R3) to tell your microprocessor to shutdown. Here is the sparkfun link: SparkFun "Uh-oh" Battery Level Indicator Kit - KIT-11087 - SparkFun Electronics.