Insect traps rely on the phenomenon that flying insects are attracted to long wave UV-A radiation.
Insects’ eyes have evolved to be sensitive to low level night time UV-A radiation and are instinctively drawn to artificially produced light.
The UV-A lamps do not kill them, this is left to high voltage wires or glue boards.
Many sterilisers use PL-S germicidal lamps.
They are cheap and reliable.