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." (ES)
English reference (ES): Vol. 3, Book 20, Hadith 2537 (ES)
Arabic reference (ES): Book 20, Hadith 2634 (ES)