2 Chronicles 7:13
If I shut up heaven that there be no rain, or if I command the locusts to devour the land, or if I send pestilence among my people; If I shut up heaven that there be no rain, or if I command the locusts to devour the land, or if I send pestilence among my people;
The verse belongs to God's answer to Solomon after the temple was finished and dedicated with great splendor before all Israel and many nations. Solomon had knelt and prayed that God, whom heaven and the heaven of heavens cannot contain, would meet His people by His Spirit and hear prayer made toward that house. Fire then came down from heaven and consumed the offering, and the glory of the Lord filled the house so that the priests could not enter, and the people bowed to worship. In answer God told Solomon that He had heard his prayer and had hallowed the house to put His name there forever, with His eyes and His heart there perpetually.
That hallowing and the continuance of favor were conditional on obedience. If Solomon walked before God as David walked, in integrity and uprightness keeping His statutes and judgments, God would establish the throne of his kingdom upon Israel forever, and the temple would stand as a lasting sign of His favor. But if Israel turned from following God to serve and worship other gods and abandoned His commandments, judgment would follow, with God cutting off Israel from the land, casting the hallowed house out of His sight, and making Israel a proverb and a by-word among all people.
Within that warning God declares that He may shut up heaven so there is no rain and withhold dew and rain, command the locusts to devour the land, or send pestilence among His people. Withholding rain in this way is a chastening judgment meant to bring His people to turn from the sins that brought it and to return to the Lord with their whole hearts, continuing until a decisive reformation takes place. These calamities of drought, locusts, and pestilence form the setting for the call in the following verses to humble themselves, pray, seek God, and turn from wickedness and wicked ways, with the promise that He will hear, forgive their sin, and heal their land.