UK traffic lights (cross roads, junctions, etc., even temporary roadworks) usually have a rectangular box on top of them, shrouded from the sun and pointing down towards the oncoming traffic, these DO sense car headlights - when there is little traffic (night time?) these sensors are just one more input to the controller to keep the traffic moving - I have used 'full beam' headlights to make traffic lights change in my favour.
It's a popular misconception, the boxes on top are microwave doppler radar detectors, they detect a vehicle approaching the lights and take account of it.