When read in context, this passage is full of conditions. If/Then statements.
Go back a couple of chapters and read everything that occurred that led up to that verse. 2Ch 3:1 ¶ Then Solomon began to build the house of the LORD at Jerusalem in mount Moriah, where [the LORD] appeared unto David his father, in the place that David had prepared in the threshingfloor of Ornan the Jebusite.
Solomon had built the temple, dedicated it, and made sacrifices to the Lord. Solomon prayed to the Lord, (See chapter 6) Then the Lord appeared to Solomon with a response to the things that Solomon had prayed.
2Ch 7:12 ¶ And the LORD appeared to Solomon by night, and said unto him, I have heard thy prayer, and have chosen this place to myself for an house of sacrifice.
In the verse right before the one that you quoted, The Lord was giving instruction on the cause and effects of sin.
2Ch 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;
Verse 14 is telling us what to do when we find ourselves out from under His grace, that results in a curse on the land. (ie: repent)