Circuit to tell Microcontroller when Voltage is Low
If you don't care much about accuracy, you can use a circuit like the below: 







simulate this circuit &ndash; Schematic created using CircuitLab

This circuit uses the Vbe of the transistor as a crude reference and thus has a threshold of around 4V. It's crude, has a mushy transfer function and will vary from unit-to-unit and with temperature. 

If you replace R1 with a resistor + zener and pick the value of R2 to pass a properly selected current through the zener you'll get a more consistent threshold of about 0.7V + zener voltage, but zeners less than about 5V have very mushy knees, so it won't be as much of an improvement as you might expect. You could consider replacing the zener + resistor with a green LED + resistor, but it would require some experimentation. It's also possible to use a TL431 with a transistor and some resistors. 

If you need something accurate that doesn't drift much with temperature, have a look at supply voltage supervisor chips which contain a reference and a comparator (and sometimes a timer).