Incandescent: A filament is heated to a few thousand degrees. It gets so hot that it puts out visible light. The objective here is to ensure that that hot filament
stays safely inside the bulb, mainly so that it doesn't set your house on fire. That's why you'll see the warnings on fixtures: "Do not use exceed a 75W bulb in this fixture." If you do, there can be excessive heat buildup in the fixture to the point that it will be damaged, or you'll have a fire.
The overwhelming majority of energy going into an incandescent light is turned into heat right away. A very small amount of it is turned into visible light.
LED: The junction temperature of the emitter itself is usually going to be rated to a maximum of somewhere around 135°C (275°F), but it's preferable to keep the emitter below 85°C (185°F). The cooler it can be kept, the longer it will maintain its light output. So with LED, the idea is to get as much heat
away from the emitter as possible. That's why you'll end up with a hot casing of an LED lightbulb. The casing is hot because it's trying to dissipate the heat of the electronic driver circuit and of the LEDs themselves. The unfortunate fact is that the common Edison screw-in socket was not made with the goal of efficient heat transfer in mind. LED lights have to do whatever they can to keep the emitters cool. Early on, this meant simply using fewer LEDs and driving them with less power, so those lamps were often dim. (
Or some manufacturers would simply run the LEDs at excessive temperatures, resulting in greatly diminished product life.)
This is a lamp that looks like it was designed with LEDs in mind. The reflector should have been designed assuming a single emitter source at the base, rather than a bulb in the middle, and there's a big heatsink in the back.
Why is it still hot? LEDs also aren't very efficient when you look at energy-in versus energy-out and visible light. I've got a design guide here from Philips (I work with LEDs) that was published in 2010. It shows that LEDs convert 15-25% of the incoming energy into visible light. The rest of the energy is lost as heat, either due to internal voltage drop in the die, or because the emitter die itself is highly refractive, which causes some of the generated light to reflect back into the die rather than leave. That light strikes the die and heats it up.
That's for a white LED. A white LED is made up of a blue emitter with a phosphor coating. The blue light hits the phosphor coating, which in turn fluoresces and emits yellow light. Some of that light is simply absorbed though, which heats up the phosphor. Some of the blue light also passes through. Your eyes see this mixture of blue and yellow light as white light.
So you've got heat losses in the electronics to regulate the power that the LEDs need, losses in the emitter die, and losses in the phosphor. To keep all of that stuff running properly, the heat needs to be removed.
Even after all those losses, LED is
still better than incandescent.
Your LED bulb also
feels hot because it's likely made of aluminum.
If you have a block of warm wood and a block of warm aluminum, both at the same temperature and warmer than body temperature, the aluminum will feel much warmer than the wood. That's because the aluminum is a better thermal conductor. The wood is an insulator. So the aluminum is going to freely dump its thermal energy into your hand, whereas the wood is not able to.
It's the same reason why a metal pot sitting unused on a shelf will feel colder than a plastic container in the same room. The metal is a good conductor, so it will more freely absorb thermal energy from your hand, and that in turn cools down your hand and the nerves in it, which makes it feel colder than the plastic of the same temperature.