Your car engine can produce something near constant power for a long period of time. If you hold the gas pedal down, why doesn't the car keep going faster and faster? Because energy loss from the system increases as the speed goes up. At some speed the power lost to drag is equal to the power input from the engine.
The same concept applies to the light bulb. The electrical energy delivered to the filament heat it up. But as the temperature increases, the more radiation that the filament emits. At some temperature, the radiative power equals the electrical power and the temperature stops changing.
Say, if the heat was unable to leave the filament for some reason
Remember that it's not just heat. It's any form of radiation. The purpose of the filament is to emit light, so you know some energy is leaving. The more you prevent it from leaving, the hotter it gets inside, but the power has to balance. Bulbs are also made to operate at a particular temperature. If you raise it too much, the filament will lose strength and fail (and then the energy input stops).
Taken to an extreme, see the xkcd what if... archive.
re you saying that the light bulb isn't going be brighter at a lower power because energy is being radiated away at the same time?
All bodies with a temperature radiate. The hotter the body, the more radiation per area is radiated. If the total power output equals total power input, then the temperature will be maintained.
Like say if you ran a light bulb at 100J/hr for one hour and then 50J/hr for two hours, by the end of the two hours the second bulb wouldn't get as bright as the first after one hour, because more energy overall would have radiated away?
The filament of a light bulb has very little mass. This allows it to move to thermal equilibrium with its environment in a very short period of time (think a second or so). In other words it is effectively true that 100% of the power delivered to the filament over a few seconds is radiated away. If you control the circuit to deliver less power, the bulb will cool.