Assuming that it was a battery light, I would have turned it off. My dynamo light has a standlight function, so it stays on for ~7 minutes after I stop. I actually had one of my coworkers tell me the other night that I forgot to turn off one of my lights on my bicycle, it was my dynamo light that was on. I thanked them, for their concern.
Other than that situation, I am very hands off around other people's bikes.
Where I grew up, you locked the front door to show that you weren't home and you left the back door unlocked--in case someone needed to get in. Wish we still lived in that world, it was much better.