The power (red) LED on my pi will not light. It was working fine, but then suddenly, while I was using it, poof! At first it blinked occasionally, now it just won't turn on. The power supply was as it was when everything was functional. BTW I was using the pi to test some code where the GPIO pins were connected to a h bridge, which was connected to some DC motors and a 9v battery.
This happens when you overload the pi or there is insufficient power. This could be solved by increasing the input current >2 amp and powering up other peripherals using an external power.
From your comments you might have a motor driver board similar to this one.
You should only connect Pi gpios to the pins labelled ENA, IN1, IN2, IN3, IN4, and ENB.
Behind ENA/ENB are jumper pins marked in red.
These pins carry 5V and should NEVER be connected to a Pi gpio.
They are a convenience. If you do not want to have ENA/ENB under software control you can enable ENA/ENB by connecting a jumper between the jumper and enable pin (as shown in the image).
If the red LED does not light then either the power supply itself is bad (which you say is not the case)
perhaps the internal voltage regulator is bad.
The first step I would take is a reading at the 5V pin. Make sure the power is actually making it through.
Then I would test the 3.3V pin.
Botttom line: The Red LED should light if there is sufficient 5V power.