Many flying insects are attracted to light due to a phenomenon called positive phototaxis. It’s like chlorophyll-containing green plants that naturally lean toward the direction of sunlight. Although it’s impossible to eliminate insects from being drawn to your outside house lights, there are some ways to help reduce it.
One option may be to switch to motion sensor lights rather than keeping your outside lights on for a long period of time. Another option may be to consider the type of light bulb you use. There are bulbs on the market that are specifically designated as a “bug light” that is less attractive to insects. Some people find them unappealing because they tend to have a strong yellow tint. A good alternative may be a modern LED light with a gentle warm tint in the lowest wattage you feel is necessary for the area you are illuminating.