Severe drought serves as a clear expression of divine judgment. When the skies are closed and rain is withheld, it acts as a direct punishment for the sins of the people, echoing the curse found in the Book of Deuteronomy [רש״י, ביאור שטיינזלץ]. This active prevention of rain forces the nation to confront their spiritual failures [מצודת ציון].
In the midst of this distress, the people direct their prayers toward the Temple, seeking mercy and a path back to God. They acknowledge their wrongdoing and repent. However, the underlying motive for their return is not entirely ideal. Their repentance is driven primarily by the desperate hope that God will answer their prayers and rescue them from their suffering, rather than stemming from a genuine, pure love for Him [מצודת ציון, מצודת דוד, ביאור שטיינזלץ].