In this chapter, God answers Solomon's prayer for the dedication of the temple.
Around half of this chapter is copied from 1 Kings, equivalent to the passage between 1 Kings 8:62-66 and 1 Kings 9:1-9. It's the same general flow but a lot of details are different, which I will cover briefly later.
At a high level, this chapter has two main parts. The first part is verses 1-10, which discusses the celebratory festival in dedication of the temple, and the second part is verses 11-22 which contains God's response to Solomon's prayer.
Beginning with verses 1-3, fire comes down from heaven and consumes the burnt offering. This is not recorded in the book of Kings. In fact, this is the second time in the book of Chronicles that we have seen fire falling from heaven, and the second time it is not recorded in the book of Kings. The other reference in Chronicles was 1 Chronicles 21:26, when David offered a sacrifice on the threshing floor of Araunah. In this case, it's possible the Chronicler is trying to allude to Leviticus 9:23-24. In that passage, Aaron is offering a sacrifice as part of his ordination as high priest, and when the offering is performed, it says that fire from God's presence goes out and consumes the offering. This is not the same event as the dedication of the tabernacle, so I don't think it's exactly a parallel in the same way that so many other aspects of Chronicles parallels the construction of the tabernacle in Exodus.
More importantly, we should be looking to see how this fits into the larger narrative of Chronicles. Basically, the previous chapter concluded the dedication of the temple. This is after many, many chapters describing all of these things that David and Solomon were doing for the LORD. This chapter, then, contains God's response to David and Solomon and the temple project as a whole. In both the first and second part, I would characterize God's response as unreserved approval. "The king and all the people offered sacrifices" (v. 4), and God responds by sending fire down from heaven onto their offering. The answer to Solomon's prayer comes in the second half of this chapter.
Meanwhile, with all the people gathered in Jerusalem in the seventh month, they take this as an opportunity to celebrate the Day of Atonement and the feast of Tabernacles, which both occur during this time frame. Verse 9 clarifies this because it says they celebrated the dedication of the altar for seven days, and then the festival (of Tabernacles) for seven more days. Since the Law mandates that all able-bodied people of Israel should go to Jerusalem for the feast of Tabernacles, timing the dedication of the altar to occur just before the festival was likely deliberate and certainly more convenient than doing them at separate times.
After all the celebrations were concluded and all the people returned home, the LORD visits Solomon privately at night to bring him the answer to his prayer. This is the second half of the chapter.
I see the LORD's response to Solomon as being directed at his prayer. In particular, in 2 Chronicles 6:26-31, Solomon asks the LORD to forgive his people if they ever sin and are afflicted by drought, famine or plague, and the LORD addresses that in verses 13-15 by basically saying yes, he will answer those prayers of repentance if they pray towards the temple. Furthermore, God offers a conditional promise to uphold Solomon's "royal throne" if he follows God's Law like David did, which is perhaps in response to Solomon's prayer in 2 Chronicles 6:16-17,42.
On the other hand, in verses 19-22, the LORD promises to cast Israel out of their inheritance and even to destroy the temple itself if the people go off to worship other gods, and for some reason God's response does not contain a promise that he would "uphold their cause" like what Solomon asked for in 2 Chronicles 6:39.
I think if I had to characterize God's response, I would say we got something pretty similar to Deuteronomy, especially Deut 28. We see God offering blessings to Solomon and Israel if they obey the Law. He promises to forgive them if they repent of their sins, but also promises to cause them harm in many different ways if they sin, up to the ultimate punishment of banishment from the promised land. I think this is very similar to the blessings and curses paradigm that is expressed in Deut 28, but with a much stronger expression of God bringing healing whenever Israel repents of their sin. In fact, I would say that verses 19-22 are very similar to Deut 29:22-28, except that Chronicles adds references to the desolation of the temple, while Deuteronomy just focuses on the desolation of the land.
In the previous chapter I said that Solomon's prayers are an expression of what he thinks the temple is there for, and more generally what he thinks about how he and the people should relate to God. This chapter is the converse: God's response to Solomon is a statement about how God thinks Israel and Solomon should relate to him. God's response contains three core elements, which I have already briefly described above.
First, he says that when Israel is punished for sinning, they should pray and repent and God would forgive them and bring healing. We have already seen this principle in action many times (throughout the book of Judges, for instance), but here the LORD is stating it plainly.
Second, God says that if Solomon walks in the same ways as his father David, he will receive the same promise as David, that his throne would be established forever. In short, Solomon's legacy and his status before God cannot be based on David's faithfulness: Solomon must also be faithful to God to receive the same reward. This is basically a statement of justice, of similar character to Deut 24:16, but in the opposite direction: Solomon will not be rewarded by God for something that he didn't do.
Third, God says that if the people turn away from him, not only will he uproot them from the land (like mentioned in Deut 29:22-28), but he will also reject the temple and make it "a heap of rubble". What this means is that God's approval of the temple and his favor over Israel is not unconditional. The essential elements of the Law of Moses still apply, which means that if Israel sin egregiously they will be kicked out of hte land in spite of the temple. If I may paraphrase from Star Wars, God is not altering the deal. Building the temple has not changed any of the fundamental characteristics of the covenantal relationship between Israel and God, and the overhanging threat of expulsion from the land is one of the central elements of the covenant.
In conclusion, even though we have reached the end of the temple narrative, the book of Chronicles does not end here. In fact, it continues for another 29 chapters. One might wonder how the narrative about the kings of Judah to follow relates to the temple narrative that we are just finishing, and the answer is in the three elements that I just explained. These three principles of how God relates to Israel are exemplified in the narrative to follow, and we will see all three of them expressed in different ways. During periods of sin, Judah will crumbles; during periods of repentance, they will be exalted; and in the dark conclusion when they turn away from the LORD with finality, they will be cast out of the promised land and taken to exile in Babylon. Meanwhile, the kings of Judah who follow in the ways of David will be established in the same covenant as David.
Meanwhile, in the next chapter, we will read about Solomon's other accomplishments during his lifetime.