The glass becomes hot when an electric bulb is kept switched on

The mechanisms of light produced by these two kinds of lamps are entirely different. The electric-bulb produces light by the process called incandescence while the tube light produces light called fluorescence.

Incandescence is the glow generated when heating a material, in this case the tungsten filament, which, being an electrical resistor would naturally generate lot of heat when electric current passes through it, by the process called Joule heating. It is common to experience heat in the vicinity of a 1000 W bulb or so and very little heating in lamps with lower power ratings.

The fluorescence lamp generates light by converting the invisible ultra-violet (UV) light generated through an electric discharge process along of the length of the tube to visible light. The UV to visible light conversion called fluorescence is accomplished with the help of a white coating made of fine particles of an inorganic phosphor/fluorescent material. Curiously we can see all tube-lights are given colour-temperature, usually marked/inscribed daylight 6,500 K which only represents its emission colour rather than temperature. So no heating is involved in the generation of light from a fluorescent lamp in contrast to that of an electric bulb.