First, we have to use as our anchor this scripture, "God blesses those who patiently endure testing and temptation. Afterward they will receive the crown of life that God has promised to those who love him. And remember, when you are being tempted, do not say, “God is tempting me.” God is never tempted to do wrong, and He never tempts anyone else. Temptation comes from our own desires, which entice us and drag us away. These desires give birth to sinful actions. And when sin is allowed to grow, it gives birth to death. So don’t be misled, my dear brothers and sisters. Whatever is good and perfect is a gift coming down to us from God our Father, who created all the lights in the heavens. He never changes or casts a shifting shadow. He chose to give birth to us by giving us his true word. And we, out of all creation, became his prized possession." (James 1:12 - 18)
So how do we explain the meaning of the strange (to us) parallel passages in 2 Samuel and 1 Chronicles in which God and Satan are both said to have incited David to number Israel:
Again the anger of the LORD was kindled against Israel, and he incited David against them, saying, “Go, number Israel and Judah.” (2 Sam. 24:1)
Then Satan stood against Israel and incited David to number Israel. (1 Chron. 21:1)
So which was it?
Let's start with a refresher course on logic with the Law of Non-Contradiction. It states "Any 'thing' (A) cannot be non-A at the same time and in the same way." In other words, something that is brown cannot be not brown. This seems simple enough, but many people forget the second half of the law, and over-simplify their reasoning. For example, a dog can be described as brown. In his later years, though, he could turn grey. So the statement "My brown dog is grey" is not a contradictory one. You see the "at the same time" phrase is important. Further, suppose when the dog was young he became jealous of another animal. Then, the phrase "My brown dog is green with envy" is not contradictory because the statement doesn't use color in the same way.
Now, let's examine the passages in question. 1 Chronicles 21:1 states that, "Then Satan stood up against Israel and moved David to number Israel." Notice the idea behind this passage is the temptation of David. Satan was actively involved in David being moved to have a census. Further in the chapter, David admits this is a sin when he declares "I have sinned greatly, in that I have done this thing.(vs. 8)" So the context of the passage plainly demonstrates that the census was an act against God.
In 2 Samuel 24:1, though, we read this, "Now again the anger of the Lord burned against Israel and it incited David against them to say, 'Go number Israel and Judah.' " Notice the emphasis in this sentence is the anger of God. Though linguistically the sentences are very similar, we must understand the context and what the writers' intents were as they penned these accounts. There would be no contradiction if BOTH statements are true ones.
We know that God will not tempt anyone (see our scripture verse above). In fact, He can keep us from temptation. We are taught to pray for His help in Matthew 6:13. Also, in 1 Cor. 10:13 we read, "No temptation has overtaken you but such as is common to man; and God is faithful, who will not allow you to be tempted beyond what you are able, but with the temptation will provide the way of escape also, that you may be able to endure it." The statement that God doesn't allow some types of temptations (those which you aren't able to resist) shows that He is in control of what chances for sin you may have. In other words, God will place a barrier between Satan and the believer and only allow him certain access. Also implied in this is the idea that Satan and his minions do seek to make the believer fall.
So, taking what we know to be true about the nature of God, we can draw the conclusion that God wouldn't have tempted David to sin. However, the statement is not a contradiction. Remember, we agreed that in order for a contradiction to occur the words must mean the same thing in the same way. The Jewish line of reasoning always saw God as the ultimate cause of all actions, either positive or negative, because of his overseeing power. This is the reason God speaks of "creating evil" in Isaiah 45. It's much like the president of a corporation claiming that he sold 45 million units last year. He didn't do it physically, but through his leadership, vision, programs and ideas he helped make it happen.
There is another instance in the Book of Job that is very similar to this. The book opens with all of the angels presenting themselves before God's throne. Satan also comes before Him and God points out that Job is more upright and blameless than anyone else on earth. Satan replies, "Does Job fear God for nothing? Hast thou not made a hedge about him and his house and all that he has, on every side?... Put forth thy hand now and touch all that he has; he will surely curse thee to thy face. Then the Lord said to Satan, 'Behold all that he has is in your power, only do not put forth your hand on him.' " Notice that God does not take away anything that Job has, nor does He cause the destruction; but He allows Satan specific license with Job.
In our instance, we have God allowing the devil the opportunity to tempt David. The king was becoming prideful, as Joab warns later by asking David " Why then doth my lord require this thing? why will he be a cause of trespass to Israel?" In chapter 20 of 1 Chronicles we read that David was abandoning his responsibility as king and allowing his generals to take the risks of war. Giving Satan license to tempt David into numbering the nation demonstrated just how much David saw the glory of Israel as something he accomplished, and not God. Thus the LORD shows David where his pride leads by allowing it to come to fruition in the form of a census. David was numbering his men to boast of his power, not recognizing that it is God who gives the victory.
The explanation is that scriptures do not mean the same thing in the same way. The reference to God inciting David is based on His final authority in all things. God is spoken of inciting David by allowing Satan access to the king for the temptation. Satan is spoken of inciting David because he is the tempter (ref Matt. 4). God wished to restore David to a proper relationship with Him, while Satan sought his failure and demise. Taking all of the above together, we see that the purposes of God can be accomplished through the attacks of Satan. In His sovereign will, God allows His children to go through adversity to strengthen them, discipline them, or equip them for a greater task at some other time.
Now some might argue, but if you can stop something and don't, aren't you ultimately responsible? Scripture is clear about God's authority but it is also clear that we are incapable of understanding the whole picture. An analogy that I have used before is that if you were to go outside and start reading Shakespeare to ants, we could expect better understanding from the ants than we humans can possibly fathom God's ways.
Don't believe me?
Let's close with what God has to say on this subject, "For my thoughts are not your thoughts, neither are your ways my ways, declares the Lord. As the heavens are higher than the earth, so are my ways higher than your ways and my thoughts than your thoughts." (Isaiah 55:8-9)