It wasn't necessarily just him. Check this out for an extended, thorough answer.
In 1879, using lower current electricity, a small carbonized filament, and an improved vacuum inside the globe, Edison was able to produce a reliable, long-lasting source of light.
This Site Might Help You. RE: when did thomas edison invent the light bulb? light bulb electricity
Thomas Edison, neither invented the light bulb, nor held the first patent to the modern design of the light bulb. Apparently, the we gave the esteemed Mr. Edison credit for the invention solely because he owned a power company, later known as General Electric, and a light bulb is just a bulb without a source of electricity to light it. In reality, light bulbs used as electric lights existed 50 years prior to Thomas Edison's 1879 patent date in the U.S. Joseph Swan, a British inventor, obtained the first patent for the same light bulb in Britain one year prior to Edison's patent date. Swan even publicly unveiled his carbon filament light bulb in New Castle, England a minimum of 10 years before Edison shocked the world with the announcement that he invented the first light bulb. Edison's light bulb, in fact, was a carbon copy of Swan's light bulb.