Summary
Predation is a powerful driver of evolution, forcing species to adapt to compensate if they’re to survive. Data on moth auditory sensitivity (“hearing”) suggest that it tends to fall cover the peak echolocation frequency used by hunting bats. The implication is that this may allow moths to eavesdrop on hunting bats and ultimately avoid them.
The details
These two elements appear inextricably linked in some species. In his fascinating contribution to Recent Advances in the Study of Bats, James Fullard at the University of Toronto in Canada reports that the auditory system of noctuid (cutworm) moths evolved as a direct result of predation by bats. Fullard notes that this species doesn't use sound socially, but their tympanal (middle ear) organs are often most sensitive to the frequency of calls emitted by echolocating (and, therefore, hunting) bats. In other words, these moths have evolved to hear the bats that feed on them coming! Indeed, Fullard has conducted numerous studies into how moth hearing has evolved in relation to the echolocative calls of the bats that feed on them.
Over the years, he has come to realize that most moths that fly in the same airspace as hunting bats avoid being eaten by using their ears, which are syntonic with the hunting calls of bats—that is to say, moths have evolved to hear in the same sound range that bats have evolved to hunt with. In one particular study, published in the Proceedings of the Royal Society of London back in 2001, Fullard reports on the predation of moths by Hawaiian hoary bats (Lasiurus cinereus semotus) on the Hawaiian island of Kaua'i, observing that the endemic Hawaiian cutworm moths (Haliophyle euclidias) were preferentially eaten by this bat, compared to other endemic and introduced species. Fullard concluded that this moth—which has hearing that is less sensitive to bat calls than the other species of moth he looked at—suffers higher predation because it is drawn away from its normal habitat, enticed by the man-made lights that are now favoured hunting grounds for bats.

Intriguingly, although the hearing of certain moths (especially noctuid moths) is related to bat predation, the emergence of nocturnal activity in moths seems unrelated to bat activity. In a 2000 paper, James Fullard reported on the day-flying butterflies in Polynesian bat-free habitat, comparing the activity of three species of nymphalid (brush-footed) butterfly on the bat-free Pacific island of Moorea with three nymphalids in Queensland, Australia (where bats actively prey on moths). Fullard found that nocturnal flight activity and the number of active individuals did not differ significantly between the two locations, leading him to conclude that living in a bat-free environment did not produce nocturnal flight in these insects. This is strange, especially considering that during the daytime, moths are at risk of predation from birds and are competing for nectar with butterflies; thus, exploiting the night-time in a habitat where there are no major nocturnal predators (i.e., bats) would seem the best course of action.
Fullard considered three possible reasons for the daytime activity seen in the butterflies from bat-free habitats: that bats weren't important nocturnal predators; that the insects are somehow constrained to the day by some physiological reason; or that the Moorean butterflies haven't spent enough time in genetic isolation. The first of these suggestions is unlikely—bats are a major predator of insects in almost every forested region of the world, and it seems doubtful that they weren't an important influence in this study. The second and third ideas are both plausible—of these, Fullard considers that the second is most probable and these insects are constrained by some physiological parameter (either temperature or light).
Subsequent research has documented hearing sensitivities at the range of bat calls in other, non-noctuid, moths. Annemarie Surlykke at Denmark University and four colleagues, for example, report that the ear of drepanid (hook-tip) moths is tuned to ultrasonic frequencies between 30 and 65 kHz. Such an observation suggests that drepanid hearing resembles that of other moths, in that the main function is bat detection.
More recently, research by Marc Holderied and his colleagues at Bristol University has found that moth wings have evolved sound dampening traits, seemingly in response to bat echolocation. In their 2022 paper to the Proceedings of the Royal Society, the researchers describe how the wings of some moths are covered by scales of varying shapes, arranged at specific angles that allow them to absorb a variety of frequencies. So effective are these scales, that the wings can absorb up to 87% of incoming sound energy at 20 kHz despite being only about 0.1 mm thick.