It was narrated from Ibn `Umar that the Messenger of Allah (ﷺ) said:
"Carrying out one of the legal punishments prescribed by Allah (SWT) is better than if it were to rain for forty nights in the land of Allah (SWT), Glorified is He."
English reference: Vol. 3, Book 20, Hadith 2537
Arabic reference: Book 20, Hadith 2634