"Everybody Loves David"—if they'd had sitcoms in roughly 1000 B.C., they might have had one with a title like this. God, especially, loves David—but so do a good number of the people who work for him. It would sort of be a stretch to say "everybody" loves him, though. He's got plenty of enemies, traitors, and even rebellious children to contend with. Yet, despite that, he's got the magic shine—the glitter effect when he smiles like in an Orbit Gum commercial.
David does some pretty nice things. He has mercy on his defeated enemies (sometimes), lets Saul's grandson live in his palace with him, and—in the aftermath of his victory over his rebellious son, Absalom—shows kindness towards an eighty-year-old man who helped him cross a river and towards a man who had formerly cursed him. So, David is full of humanity and warmth… at times.
Then, there's the dark side of David. His worst sin is, we must admit, a pretty bad one. In fact, it makes Saul's decision to not kill some choice livestock and to spare the life of the Amalekite King in 1 Samuel, look like a walk in the park by comparison (even though Saul is punished more harshly for doing this than David is for his sin).
David is a murderer—to put it plain and simple. No one could possibly deny this fact—he seduces his general Uriah's wife, Bathsheba, impregnates her, and orders his soldiers to leave Uriah exposed in combat—causing not only Uriah's death, but the deaths of other innocent people, as well.
In another bad moment, David refuses to punish his first-born son, Amnon, for raping his own sister, Tamar (or, properly, half-sister, David's daughter by another wife). This understandably provokes David's favorite son, Absalom (Tamar's brother by the same mother), to kill Amnon and later rebel against David. So, that all might not make David Hannibal Lecter-level bad—but it's still makes for one unsavory pot-pie, doused in shame gravy. (And there are a few more dubious incidents to boot.)
So it's hard to fully figure out David. What lies at the rock bottom of his character—what are this guy's motives? We would like there to be some sort of high, selfless ideal—he's working for justice, or for the betterment of humanity or whatever. But the character often seems pretty selfish, and consumed with his own ambitions for retaining power.
Yet, at the same time, he has the capacity to move the reader—he's a poignant poet, giving a touching speech for the fallen Jonathan and Saul, and uttering heartfelt prayers of thanksgiving to God. He boldly risks looking silly by dancing in front of the Ark for God, while clad in a linen ephod (which isn't all that much to wear). His religiosity is sincere, but he constantly has trouble living up to it.
A good example is his lament for Jonathan: "Jonathan lies slain upon your high places. I am distressed for you, my brother Jonathan; greatly beloved were you to me; your love to me was wonderful, passing the love of women. How the mighty have fallen, and the weapons of war perished!" (2 Sam 1:25-27).
The biggest crisis for David comes when his son Absalom rebels. We see both the bad and the good in David:
So, that's David. Or, actually, that isn't David—not all of him. You can keep thinking about the dude and trying to figure him out, since he's got so much going on. He's one of the Bible's richest and most thought-provoking characters.
Oh, and fittingly, the name David means "Beloved."