The rain was falling on the day when the Battle of Hunayn took place. The Prophet (ﷺ), therefore, commanded that the people should offer their prayer in their camps.
Sunan Abi Dawud Book 2, Hadith 668