Battle of the Trench
The general agreement of scholars is that this surah was revealed shortly before or after the Battle of the Trench in 5 AH.