Traffic lights are at separate spots/locations. How can we keep to/right on them all the way? Keeping to traffic lights does not necessarily mean you go straight through them.
It is probably clearer to say: Go straight through the traffic lights all the way.
It's talking about just one set of traffic lights. The instruction is continue straight along the road in question until you reach the traffic lights. There would be further instructions after that.
In BrE, telling someone to go
straight through a set of traffic lights would be encouraging them to break the law. We use that when people have carried on driving despite the traffic lights being red. If we want to tell someone that they shouldn't turn left or right when they get to the traffic lights but should stay on the same road, we say "Go
straight across at the traffic lights".
You used "Keeping to traffic lights ...". That means nothing.
"How can we keep to/right on them all the way?" is also ungrammatical and I don't know what you were trying to say.