2 Samuel 22 — Now that’s a song! It’s completely antithetical to something often said in charismatic churches, which is that we praise God because of who he is, not because of what he’s done. But the Bible doesn’t separate one from the other. Now I’m not suggesting that God is identified with his acts, as if to say that had God never acted in history then God would not exist (it’s not like I’m Moltmann or Pannenberg!), but rather that God is identified by his acts. It’s one of the ways he has chosen to reveal himself. And we’d be foolish not to worship God for what he does because what he does tells us plenty about who he is.
2 Samuel 24 — Now what am I missing here? David said he sinned in numbering the people (v. 10) but the LORD told him to do it (v. 1). 1 Chronicles 21:1 says that it was Satan who incited David to number Israel. This makes more sense of what follows. So if we combine the information of both passages perhaps we could say something like the LORD’s anger was kindled against Israel so he allowed Satan to incite David to take a census and after David succumbed to Satan God punished Israel with a plague that killed 70,000. But two things come to mind regardless of how we read this (whether in harmony with 1 Chron. 21 or not): first, God punished Israel with pestilence (btw, that’s what I used to call myself when I rapped back in the day), so we can’t say that all sickness of of the devil (in the OT it is often of God and used as a consequence for disobedience), and second, David’s acts affected the entire nation—it’s not like we’ve never seen this before—Adam’s disobedience had dire consequences for all humanity (cf. Rom. 5:12). But something else stands out as well, namely that David refused to offer God something that cost him nothing (v. 24). And that’s the nature of sacrifice, isn’t it? It always has to cost something.