2 Chronicles 7:1-3
7:1 When Solomon finished praying [note that God gave an immediate sign of His basic approval of Solomon’s prayer; a more definitive answer to his prayer would come 13 years later], fire came down from heaven and consumed the burnt offering and the sacrifices, and the glory of the LORD filled the temple.
7:2 The priests could not enter the temple of the LORD because the glory of the LORD filled it.
7:3 When all the Israelites saw the fire coming down and the glory of the LORD above the temple, [note the response of the people to the evidence of God’s glory]  they knelt on the pavement with their faces to the ground, and  they worshiped and  gave thanks to the LORD, saying, “He is good; his love endures forever.”
2 Chronicles 7:11-22
Solomon’s prayer at the dedication of the temple is recorded in 2 Chronicles 6:14-42. God’s answer to Solomon’s prayer came 13 years later and is recorded in these verses. The reason for the delay of 13 years is not given. God in His infinite wisdom answers our prayers in His own time and in His own way.
7:11 When Solomon had finished the temple [took seven years to build (1 Kings 6:38; 9:10)] of the LORD and the royal palace [construction of his personal palace took thirteen years (1 Kings 7:1)], and had succeeded in carrying out all he had in mind to do [emphasizes the thoroughness of Solomon’s work] in the temple of the LORD and in his own palace,
7:12 the LORD appeared to him at night and said: “I have heard [to hear and to take appropriate action in response to the message received] your prayer and have chosen this place [cf. Deut. 12:5] for myself as a temple for sacrifices.
Note: Someone has said that God always answers prayer, but His answer may be yes, no, or later. How do you respond when the answers to your prayers are delayed? Why does God sometimes delay the answer to our prayers? What do you say to God while awaiting His answer? Read Habakkuk 1:2.
7:13 [note three potential natural disasters for disobedience; cf. covenant curses in Deut. 28:15-68] “When I  shut up the heavens so that there is no rain [drought], or  command locusts to devour the land [read about the destructive power of locusts in Joel 1:4-7] or  send a plague [a fatal illness that affects both people and animals] among my people,
7:14 if [clause leaves no room for negotiation] my people, who are called by my name [in OT a name represented one’s existence, character, reputation], will [note four conditions that must be met…]  humble [abandon trust in self and submit totally to God; complete rejection of human pride and absolute submission to God; cf. Jas. 4:6] themselves and  pray [cf. Jas. 4:2-3 re: two faults of many people’s prayer life] and  seek [searching until finding] my face [represented His disclosed presence] and  turn [to change direction or loyalty; start living according to terms of covenant] from their wicked [evil; cf. Lev. 18:1-30] ways, then [note God’s specific response when conditions met…] will I [A] hear [verb implies acting upon that which is heard] from heaven and will forgive [remove sin as a barrier to fellowship with God; forgiveness was their greatest need] their sin [every wrong deed] and will [B] heal [reversal of conditions mentioned in 7:13 (remove drought, locusts, plague)] their land.
7:15 [direct response to Solomon’s request in 2 Chron. 6:40] Now my eyes will be open and my ears attentive [indicates giving full attention] to the prayers offered in this place.
7:16 I have chosen and consecrated [literally “I have caused it to become holy”; God set apart the temple as His special place for people to worship Him] this temple so that my Name [represents God’s presence] may be there forever. My eyes and my heart [“eyes” and “heart” show God’s personal involvement] will always be there.
7:17 “As for you, if [condition; God expects the same of us] you [Solomon] walk before me as [following the example of] David your father did, and do all I command [probably refers to specific directions in specific circumstances that might arise], and observe my decrees and laws [encompasses fixed teachings from written Word of God; cf. Deut. 17:18-20],
Note: Prayer must be accompanied by an obedient life. God expects obedience from those who pray.
7:18 I will establish [literally “cause to stand”] your royal throne, as I covenanted with David your father when I said [cf. 2 Sam. 7:12-16], ‘You shall never fail to have a man to rule over Israel.’
7:19 “But [reminder that Solomon, like us, had the capacity to disobey God] if [condition] you [Solomon and his descendants and the people as a whole] turn away and forsake the decrees and commands I have given you and go off to serve other gods and worship them,
7:20 then [consequence] I will uproot Israel [punishment against entire nation, not just king] from my land, which I have given them, and will reject this temple [the place God was accepting as a place for worship and prayers] I have consecrated for my Name. I will make it a byword and an object of ridicule among all peoples.
7:21 And though this temple is now so imposing [literally “most high”], all who pass by will be appalled and say, ‘Why has the LORD done such a thing to this land and to this temple?’
7:22 People will answer, ‘Because they have forsaken the LORD, the God of their fathers, who brought them out of Egypt, and have embraced other gods, worshiping and serving them—that is why he brought all this disaster on them.’”