Both humidity and temperature affect how much acoustic energy is absorbed by the atmosphere. High frequencies are affected more than lower frequencies.
This chart diagrams the absorption. The chart on the left plots the absorption of two different frequencies over a range of relative humidities (x axis). The units of absorption (y axis) are decibels lost over 100 meters of travel. It shows that the maximum absorption happens at fairly low relative humidity, then drops steeply as the humidity rises, gradually leveling out toward the higher humidity ranges. So sound will travel farther at 30% relative humidity than at 10%.
The right side uses the same y axis units, and plots absorption over a range of temperatures (x axis) for three different relative humidities (frequency not specified). On average, the absorption peaks at 20–30 degrees C (a warm Spring day), and drops to either side of that. So sound would travel farther both on a very cold and a very hot day than it would on a nice warm day.