Calling core functions in an object constructor can cause serious problems...
TLight(int red, int yellow, int green)
{
...
pinMode(rP, OUTPUT);
pinMode(yP, OUTPUT);
pinMode(gP, OUTPUT);
}
Object constructors are called before the hardware has been initialized. Add a begin function that initializes the hardware then call begin in setup. In other words, use Serial as an example of how to do things correctly.