Mosquito zappers use UV light and electrocution to kill bugs. The light attracts the bugs until they touch the screens and get electrocuted.
Though it can certainly kill bugs, the ratio of lured mosquitoes is low.
According to the analysis of Dr. Douglas Tallamy from the University of Delaware, bug-zappers kill tons of insects each year but most of them are hardly mosquitoes.
These devices are even detrimental to the local ecosystem because it kills even the beneficial insects that help in pollinating plants.