Fluorescent light fixtures hum when they have a magnetic, rather than electronic, ballast. The noise is caused by the magnetic ballast vibrating at a frequency of 60 hertz.
Magnetic ballasts, also known as transformers, have relatively low cycle rate modulating the alternating current in the fluorescent tube, which often results in a noticeable flickering of the light source. The simplest solution to avoid these effects is to replace the magnetic ballast with a modern electronic ballast which operates at 20,000 to 60,000 hertz. Additionally, electronic ballasts conserve electricity better; magnetic ballasts can waste up to 10 percent of a lamp's input power.