hormones
What Insects Are Attracted to Lights?. Moths,little bugs, mosquitos, and if it's really hot, FLIES!!
No, certain types of insects like moths and gnats are though.
turn off the light. If it still there annoying you for weeks then you might consult a professional pest control.
Nobody really knows, but one possibility is that they are trying to navigate by the Moon.