Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
suyuti:3874a

“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.” (Using translation from Ibn Mājah 2537)   

السيوطي:٣٨٧٤a

" إِقَامةَ حَدِّ، منْ حُدُودِ اللْه تعالى خَيرٌ مِن مَطَر أَرْبَعينَ لَيلَةً في بِلادِ اللْهِ ".  

[هب] البيهقى في شعب الإيمان [طب] الطبرانى في الكبير عن ابن عمر

See similar narrations below:

Collected by Ibn Mājah
ibnmajah:2537Hishām b. ʿAmmār > al-Walīd b. Muslim > Saʿīd b. Sinān > Abū al-Zāhiriyyah > Abū Shajarah Kathīr b. Murrah > Ābin ʿUmar

“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.”  

ابن ماجة:٢٥٣٧حَدَّثَنَا هِشَامُ بْنُ عَمَّارٍ حَدَّثَنَا الْوَلِيدُ بْنُ مُسْلِمٍ حَدَّثَنَا سَعِيدُ بْنُ سِنَانٍ عَنْ أَبِي الزَّاهِرِيَّةِ عَنْ أَبِي شَجَرَةَ كَثِيرِ بْنِ مُرَّةَ عَنِ ابِنْ عُمَرَ

أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ إِقَامَةُ حَدٍّ مِنْ حُدُودِ اللَّهِ خَيْرٌ مِنْ مَطَرِ أَرْبَعِينَ لَيْلَةً فِي بِلاَدِ اللَّهِ ﷻ