If a unit gets into the back of a vehicle, they'll turn on the head lights, and if they get out as the last unit they'll turn it off.
They also shut it off if you tell them to eject.
This means that it's no longer possible to have AIs leave lights on in vehicles, as they turn it off when ejecting, even if they're not the driver.
They also don't toggle it based on behaviour when they're not the driver, so you can't have ambushes with vehicles with no drivers because they'll insist on having the lights on giving away your position like a christmas tree.