It's a visual trope that you often see in cartoons. When someone has a spark of inspiration and thinks of a solution to a problem, a light bulb appears and lights up.
This common symbol developed for a reason: the incandescent light bulb--and electric lighting generally--radically changed the way that people live their lives. In Collectors Weekly, Hunter Oatman-Stanford traces the history of the light bulb and the impact it had on the human experience. He quotes Alan Makkos, an antique electric hardware dealer:
But significantly, it was the public yearning for modern lighting that brought electricity to the masses, causing seismic shifts in our daily lives. Widespread electrification created the 24-hour workday, extending production hours into the darkness of night. Evening entertainment and social outings became routine rather than the exception. Sporting events could happen after dark, and people could invite friends over to drink cocktails and listen to phonograph records. […]
“I believe the light bulb was a turning point for humanity—as much as the printing press,” Makkos adds. “Technologically speaking, mankind has advanced more in the last hundred years than the thousand before that. Without the invention of the light bulb, there would be no modern computer as we know it today.”
-via The Presurfer