Full Charge Indicator
I'm assuming that you mean a battery charger, and a lead-acid charger in particular. A typical scenario is that the charger applies a constant current to the battery until the voltage rises to the desired level, maybe 14.4V for a 12V battery. The charger then switches to constant-voltage charging at this voltage until the current falls to some small value. At that point the red light goes out, the green light goes on, and the charger switches to a lower "float" voltage.

The circuitry involved is generally much more than a transistor. To do this right you need a good voltage reference, a circuit that converts the charging current to a voltage, some comparators, and some flip-flops to keep track of the current charging mode.