When David committed adultery with Bathsheba and killed her husband Uriah the Hittite, God said that this would be his punishment:
11Thus saith the LORD, Behold, I will raise up evil against thee out of thine own house, and I will take thy wives before thine eyes, and give them unto thy neighbour, and he shall lie with thy wives in the sight of this sun. 12For thou didst it secretly: but I will do this thing before all Israel, and before the sun.
-- 2 Samuel 12:11-12 (KJV)
Later on in the book, Absalom, David's son, seizes the throne and has sex with ten of David's concubines.
21And Ahithophel said unto Absalom, Go in unto thy father's concubines, which he hath left to keep the house; and all Israel shall hear that thou art abhorred of thy father: then shall the hands of all that are with thee be strong. 22So they spread Absalom a tent upon the top of the house; and Absalom went in unto his father's concubines in the sight of all Israel.
-- 2 Samuel 16:21-22 (KJV)
This is an exact fulfillment of what God said that He would do to David for committing adultery and killing. However, this means that God is the one who caused Absalom to commit gross sexual sin that he committed.
It is also important to mention a passage from the first chapter of the book of James:
13Let no man say when he is tempted, I am tempted of God: for God cannot be tempted with evil, neither tempteth he any man: 14But every man is tempted, when he is drawn away of his own lust, and enticed. 15Then when lust hath conceived, it bringeth forth sin: and sin, when it is finished, bringeth forth death.
-- James 1:13-15 (KJV)
Also, the Bible says that God wanted to kill Absalom shortly after he did all of these things, and went to open war against David:
And Absalom and all the men of Israel said, The counsel of Hushai the Archite is better than the counsel of Ahithophel. For the LORD had appointed to defeat the good counsel of Ahithophel, to the intent that the LORD might bring evil upon Absalom.
--2 Samuel 17:14 (KJV)
Two questions:
Did God cause Absalom to sin?
If so, why would God punish someone for something that He caused them to do?
How can these things be be explained?