Light is a important way in controlling vegetable pests. In this work, we examined the effects of blue light on Bemisia tabaci on cucumbers, as well as on nutrients, secondary metabolites, and resistance-related enzymes in cucumbers. Results of the direct repellent test showed that blue light had a strong repellent effect on B. tabaci, which increased with light intensity and exposure time. The repellent effect of direct light was stronger than that of transmitted light under the same light intensity and time. The population decline rate of B. tabaci was 77.7% after direct exposure to 1200 lx blue light for 5 min, being 17.4% higher than that of transmitted light. After 2 min exposure to 1750 lx blue light, the population decline rate was 41.2%, which was 10.6% higher than that of transmitted light. Under the condition of pot culture, blue light also had a good repellent effect on B. tabaci on leaves. The corrected population decline rate of B. tabaci reached 88.5% after 5 h exposure to 100 lx blue light. Blue light affected the development of B. tabaci. In addition, blue light significantly increased the contents of soluble sugar, free protein, total phenols and flavonoids in cucumber leaves, decreased the content of proline. The contents of trans-β-farnesene, trans-2-hexenal, cis-4-heptanal, trans-β-ocilene, D-carvone, longifolene and 3-carene, and the activities of peroxidase, catalase, superoxide dismutase, ascorbate peroxidase were significantly increased. The results suggested that blue light could drive off B. tabaci and influence the resistance of cucumber. 100 lx blue light had a good control effect on B. tabaci.