Being deaf will prevent you from hearing things, with several sound-related messages no longer printing and others using an alternate message; as of NetHack 3.6.2, this also includes verbal messages for seduction and charming, which still printed due to a bug. It is indicated by the word Deaf on the status line.
The most common source of deafness is the monster-summoning effect of a magic trap; you may also end up deafened once you begin fainting from hunger. Applying a leather drum or an uncharged drum of earthquake will deafen you as well.
In the Plane of Air, being caught inside a cloud during a storm will deafen you, among other undesired effects.
While deafness does not factor directly into any monster's attacks, most contextual messages hinting what is on your current floor will not appear, which may hinder you slightly. In addition, you will not hear any combat sounds either, which includes your pets fighting monsters or other monsters zapping wands.
In addition to simply going away over time, deafness is trivial enough to cure with a unicorn horn. Despite posing relatively little threat on its own, it should be cured as soon as possible in order to efficiently keep track of your surroundings; this can help you avoid being surprised by monsters that you would otherwise have heard, e.g. a gelatinous cube eating and engulfing items.