I’ve spent ages thinking about this question, I love it!
Quite often sayings like this come about for strange reasons, but I would guess that a lightbulb coming on is actually quite like having an idea. You’re ‘in the dark’ about something, and suddenly something clicks, and ‘bingo’ it’s like someone switched on the light and illuminated what you’re thinking about.
I don’t know whether this is truly why we represent and idea with a light bulb, but it’s my best guess!
I don’t know why we do this, but I think Suzi’s suggestion is really good. I can’t think of any other reason why we use a lightbulb above a head to represent an idea. Instead I had the silly idea to see if I could draw a face with a lightbulb over it, using the letters available in the answer box. I won’t know how I’ve done until I click submit. Scientists love to experiment.