Like many inventors throughout history, Thomas Edison wasn't working in a vacuum (though he was working on his bulb with a vacuum pump). In fact, many other inventors had worked with incandescent lighting before Edison. This simply meant that they had some sort of wire or filament that they could get to incandesce (glow) by passing electricity through it. And therefore they could create light.
The first recorded instance was in 1802 by Humphry Davy, who passed electricity through a platinum strip to make it glow. This was almost 80 years before Edison received his light bulb patent!
But let's make a modern day comparison to what was happening. Imagine that someone had invented the first cell phone, but that their phone only allowed for 10 second calls, the battery only lasted 20 minutes before you had to buy a new one, and it only worked from one location. If that were the case, you could certainly say that this person had invented the technology, but you'd also know that almost no one would use that phone or be able to afford the continual battery replacements.
In other words, that hypothetical phone paved the way for something great, but it wasn't practical to use and it wasn't commercially viable since no one would buy one. In a similar way, several people had developed some kind of incandescent light bulb before Edison, but his was the first that was practical and commercially viable.
Following the analogy of being able to use the phone in just one location, the phone itself is not the only consideration; you need towers or satellites to make them work. Likewise with light bulbs, you need distributed electricity, and this is part of the solution that Edison also brought to the table.
Perhaps the closest feat to Edison's prior to Edison's patent was the success of Joseph Swan, who developed an "evacuated" incandescent bulb and had it patented in England around 1880 -- the same year as Edison's patent, though he had publicly demonstrated it in 1878. "Evacuated" means he had used a vacuum pump to remove air from the bulb to prevent the filament from oxidizing. This followed a much earlier bulb by Swan, and was made with improved vacuum pumps.
But Edison created bulbs that burned brighter (were more useful) than many early efforts, and his bulbs simply lasted longer (were more affordable). While his earliest "successful" light bulb lasted just over 10 hours, he and his team eventually developed a carbon / bamboo filament that allowed a bulb to run for more than 1000 hours -- a similar life span to incandescent bulbs still in use today (though we use different filaments now). Part of his success also came from an improved vacuum in his bulbs. And with the country's first electricity company, he provided the means for people to actually run their light bulbs.
In short, he made bulbs that were practical to use and commercially viable, and this is what we really mean when we say "Thomas Edison invented the light bulb." He didn't invent the concept. He invented the means for us to use the light bulb in everyday life.