Using capacitors for flashing lights
What you've seen with two LEDs it is called an astable multivibrator.



It has two states that change whenever one of the capacitors is discharged. 

Assume Q1 is ON. This means the positive side of C1 gets connected to ground. This leads to reverse charging of it (discharging), thus modifying the voltage at the negative side - it becomes positive and biases Q2 which turns ON. Q2 starts discharging C2 and it turns ON Q1 again. And this cycle repeats forever.

While either of the capacitors is charged, the base voltage of the transistor is negative, thus the transistor remains OFF. The frequency of this is related to the time needed for the capacitor to discharge (when it is connected in reverse polarity to ground via a resistor - e.g. C1-R2).

Source: Wikipedia - Astable Multivibrator 

LED Flasher circuits usually work on the same principle. 



Source: next.gr

When they have one LED, the other is usually replaced by a resistor.