1. David commits adultery with Bathsheba and arranges the death of Uriah, Bathsheba’s husband.
‘Many homes in the Holy Land, both then and now, had flat roofs. In the heat of the Middle East, much of the people’s time was spent walking or sitting on their roofs in the refreshing cool of evening or in the day to catch a daytime breeze. The roof of David’s palace was probably high enough that he could have looked into the inner courts of a number of homes nearby.’ (Institute Old Testament Manual)
2. David is told that he will be punished because of his sins.
“As happens too frequently, it is only when a sinner knows that his sin is known that he begins to repent! The figure of Nathan boldly accusing the king to his face by an allegorical parallel is impressive, though not as surprising in Bible stories as it would be in accounts of other peoples where the will of God was not such a recognized factor in determining the morality of men and in specifying the results. Nathan’s allegory was skillfully drawn, and his climatic ‘Attah ha ish!’ (‘Thou art the man’) must have crashed in upon the conscience of David like the harbingers of doom’s day.
“His repentant feelings were no doubt sincere, but he could not repent enough to restore the life of his friend, Uriah, nor the virtue of his wife. Though he later hoped and prayed that his soul would not be left forever in hell (the spirit prison), yet the eternal destiny of doers of such twin sins does not look good. (See Psalms 16 and 51; then see Hebrews 6:4–6; Revelation 22:14–15; D&C 132:27; 76:31–37; 29:41 and 42:18, 79.)” (Rasmussen, Introduction to the Old Testament, 1:185.)
2 Samuel 12:7 Thou art the man
‘What a terrible word! And by it David appears to have been transfixed, and brought into the dust before the messenger of God.
Thou Art this son of death, and thou shalt restore this lamb Fourfold. It is indulging fancy too much to say David was called, in the course of a just Providence to pay this fourfold debt? to lose four sons by untimely deaths, viz., this son of Bath-sheba, on whom David had set his heart, was slain by the Lord; Amnon, murdered by his brother Absalom; Absalom, slain in the oak by Joab; and Adonijah, slain by the order of his brother Solomon, even at the altar of the Lord! The sword and calamity did not depart from his house, from the murder of wretched Amnon by his brother to the slaughter of the sons of Zedekiah, before their father’s eyes, by the king of Babylon. His daughter was dishonored by her own brother, and his wives contaminated publicly by his own son! How dreadfully, then, was David punished for his sin! Who would repeat his transgression to share in its penalty? Can his conduct ever be an inducement to, or an encouragement in, sin? Surely, No. It must ever fill the reader and the hearer with horror. Behold the goodness and severity of God! Reader, lay all these solemn things to heart.’ (Clarke’s Commentary on the Bible)
3. A repentant David seeks forgiveness.
‘David’s poignant plea for forgiveness after his sin with Bathsheba is expressed in Psalm 51. Out of the agony of his repentance comes marvelous doctrinal truth. The intent behind the offering of sacrifices is taught – to witness to god a broken heart and contrite spirit (v17), characterstics the Saviour himself exhibited as he worked out the infinite and eternal atonement.’ (Andrew C Skinner and D Kelly Ogden, Verse by Verse, The Old Testament)
Psalm 51:1 Tender mercies
‘David’s words show that even in Old Testament times, the Lord’s people understood that their hearts must be given to God, that burnt offerings alone were not enough.
The sacrifices mandated during the Mosaic dispensation pointed symbolically to the atoning sacrifice of the Messiah, who alone could reconcile sinful man with God. As Amulek taught, “Behold, this is the whole meaning of the law, every whit pointing to that great and last sacrifice; … the Son of God” Alma 34:14′ (Bruce D Porter, General Conference, October 2007)