David was firmly established as the King of Israel and had his own beautiful palace already built with the supplies from King Hiram of Tyre (14:1). As he contemplated his comfortable situation, he felt sorry that the Ark of the Lord was only housed in a tent (for further information see commentary on the parallel account in 2 Samuel 7). His love for God motivated him to want to do something for Him, and God honoured his desire (Psalm 37:4); however, it was honoured in God's own way and in harmony with His divine plan.
When the prophet Nathan heard David's desire, he did not first enquire of the Lord, but spoke with his emotions and his natural mind's understanding instead of the mind of God. He encouraged David to fulfill his desire of building a proper house for the Lord. God, however, did not leave His will ambiguous but made it clear that same night by revealing to Nathan that it was not His will for David to build Him a house. The reason given later on in the book of Chronicles is that David was a man of war and had shed much blood (22:8; 28:3). The reign of his son Solomon, however, would be more peaceful, a much better atmosphere in which to build God's house.
The Lord used this occasion to promise David that rather than David building a house for the Lord, He would build a house for David — not a house built of stone, but an enduring dynasty. It would be his son, not he, that would build God's house. David was overwhelmed by God's graciousness, and this was expressed in his prayer. Indeed, the Lord had elevated this shepherd boy to the highest position in the land and had given him the responsibility to now shepherd His people Israel (17:7). David humbly recognized God's sovereignty, majesty, and transcendence, as well as his own unworthiness for such a great blessing to be bestowed upon him. Yet, as his prayer revealed, he received it with great faith and thankfulness. We are all unworthy recipients of God's grace and blessings, especially of His "indescribable gift", the Lord Jesus Christ, the master builder of God's Kingdom (2 Corinthians 9:15).
David may not have fully recognized the implications of God's promise, but as the Messianic hope of Israel grew and more prophecies were revealed, it became clear that the Messiah Himself would come from the line of David, and it was He who was spoken of in the words: "He shall build Me a house, and I will establish his throne forever" (17:12; Luke 1:32-33). The Messiah would build God's spiritual house by bringing people into the Kingdom of God. This was, and will continue to be, fulfilled by Jesus Christ, whose throne will truly last forever and ever. The New Testament views the next verse as clearly referring to Jesus and expressing His deity: "I will be his Father, and he shall be My son" (17:13; Acts 13:33; cf. Psalm 2:7,12; Hebrews 1:5).
As chapter 18 goes on to prove, David's reign was indeed full of much warfare, but through it all, we are told of how God preserved him and gave him the victory (18:6, 13). David's military might secured all his borders and gave him vassals as well. This helped to financially strengthen the nation and even provide some of the building materials for the Temple which Solomon would later build (v. 8, 11). To the west, David conquered Philistia (v. 1); to the east, Moab (v. 2); to the north, Syria, called Aram at that time (vv. 3-11); and to the south, Edom (vv 12-13).
After reading of David's conquests, the chronicler mentions David's administrative officers (18:14-17) to show that his kingdom was efficient and well organized. David's accomplishments are summed up with the words: "So David reigned over all Israel, and administered judgment and justice to all his people" (18:14). These same qualities came to be expected of the coming Messiah. Our Lord certainly does administer perfect justice.