After the failure of King Saul, 2 Samuel depicts David as a true (though imperfect) representative of the ideal theocratic king. Under David’s rule the Lord caused the nation to prosper, to defeat its enemies, and to realize the fulfilment of His promises.
This book is the history of the reign of king David. It relates his victories, the growth of the prosperity of Israel, and his reformation of the state of religion. With these events are recorded the grievous sins he committed, and the family as well as public troubles with which he was punished. We here meet with many things worthy of imitation, and many that are written for our warning. The history of king David is given in Scripture with much faithfulness, and from it he appears, to those who fairly balance his many virtues and excellencies qualities against his faults, to have been a great and good man.
Matthew Henry