Regarding Exodus 20:5,Deuteronomy 24:6,Isaiah 14:21 the question was "Does god punish children for their fathers sins? or doesn't he?
Exodus 20:5 You shall not bow down to them or worship them; for I, the LORD your God, am a jealous God, punishing the children for the sin of the parents to the third and fourth generation of those who hate me.
Another Version - "You shall not bow down to them or serve them, for I the LORD your God am a jealous God, visiting the iniquity of the fathers on the children to the third and the fourth generation of those who hate me," - ESV
The 10 Commandments were given to the Israelites, God's chosen people, and these Laws were pertaining to their Inheritance of the Promised Land.
By God saying that the Iniquity would Visit/Punish the Children of the Sinners, he was not implying that he would Kill the Children or Directly inflict punishment on them. Rather he was stating the fact that, children inherit the Results of the sins that Parents Commit.
An Example :
- If a Father squanders an inheritance, that could have sustained his Family for many future Generations.. The Children are burdened by his actions.
In this Scenario, the Fathers would be Kicked out of the Promised Land, and for this reason they were Punished, and indirectly their children suffer because of it..
This is no Different then Adam transgressing, and his Children inheriting his Fallen Flesh.
A descriptive scripture is Leviticus 26:39 "And those of you who are left shall rot away in your enemies’ lands because of their iniquity, and also because of the iniquities of their fathers they shall rot away like them." - This shows that Children are Punished for their own iniquity, but also they naturally are punished because of their Parents iniquities.
God's love and patience is seen in the fact, that he did not Expel the Israelites immediately from the Promised Land, because of their Idolatry.
The Phrase "to the third and the fourth generation of those who hate me," shows that the Burden actually fell on the 3rd or 4th Generations, after the Idolatary began.. In the light of that context, we see that Israel practiced idolatry but God did not throw them out of the land for some generations later. I would not take the 'three generations' as being too strict for God might show mercy and extend the time of his judgments until later. This does not mean that the first generation that practiced idolatry would be without any punishment at all, it just means that as a nation, under national sins, God would not punish them immediately. Second, it does not mean that God would punish the innocent, for if a generation would stop the practice, God would restore them and forgive them. The phrase implies 'persistence in sin' for 'generations'.
Deuteronomy 24:16 is not a contradiction, it is a reinforcement of what we see in Exodus 20:5
“Fathers shall not be put to death because of their children, nor shall children be put to death because of their fathers. Each one shall be put to death for his own sin."
While Children may very well turn to Sin because of the Examples that their Parents set, Yahweh does not Punish, or Kill a child based on the actions of his parents.
Proof of this can be seen in Ahaz the Father of Hezekiah - Hezekiah was a great and godly man (2 Kings 18), his father was a Wicked Man he even Sacrificed his sons in the Fire (2 Kings 16:3)
Isaiah 14:21 is Referring to a Different Time Period.. This can be seen in the Preceeding Verses, the key verses are these :
V4 "“How the oppressor has ceased, the insolent fury b ceased!" (The Opressor has not ceased now)
V5 "5The LORD has broken the staff of the wicked,the scepter of rulers 6that struck the peoples in wrath" (the scepter of rulers has not been broken)
V7 "7The whole earth is at rest and quiet; they break forth into singing."(the earth is not quiet and peaceful)
V9 "9Sheol beneath is stirred up to meet you when you come;
This book is referring to Satan, His empire and a future Time after the Millenium.
The Children, are not Innocent or underserving of Annihilation, these Children are mentioned here : Matthew 23:33 "Snakes! Sons of vipers! How will you escape the judgment of hell?"
These Offspring are wicked Matthew 12:34 "You brood of vipers! How can you speak good, when you are evil? For out of the abundance of the heart the mouth speaks.
They are not being Destroyed because of the sins of their father.. They are being destroyed, because they are off spring of Satan, and they choose him as their father instead if Yahweh.