Fathers shall not be put to death for their children, nor children put to death for their fathers; each is to die for his own sin. (Deuteronomy 24:16, NIV)
The soul who sins is the one who will die. The son will not share the guilt of the father, nor will the father share the guilt of the son. The righteousness of the righteous man will be credited to him, and the wickedness of the wicked will be charged against him. (Ezekiel 18:20, NIV)
Muslims see these verses as confirming their beliefs and proving that
Christianity is wrong. They understand these verses to mean that each person can only bear their own sin and that therefore Jesus cannot die for our sins. This, however, is not the case because both of these verses are referring to a person living under the covenant of the Torah (the Law of Moses). Deuteronomy 24:16 is part of the Torah itself and Ezekiel 18:20 is addressing the Israelites who were living under the Torah. That is, the context of these verses is the Torah and not the Qur'an. If we want to understand the verses we need to understand some basics about the Torah.
When somebody living under the Torah sinned they were responsible for what they had done, but if they repented they could be forgiven by a sacrifice that would bear their sin before God. The Torah explains this.
(H)e must bring as his offering for the sin he committed a female goat without defect. He is to lay his hand on the head of the sin offering and slaughter it at the place of the burnt offering. Then the priest is to take some of the blood with his finger and put it on the horns of the altar of burnt offering and pour out the rest of the blood at the base of the altar. He shall remove all the fat, just as the fat is removed from the fellowship offering, and the priest shall burn it on the altar as an aroma pleasing to the LORD. In this way the priest will make atonement for him, and he will be forgiven. (Leviticus 4:28-31, NIV)
For the life of a creature is in the blood , and I have given it to you to make atonement for yourselves on the altar; it is the blood that makes atonement for one's life. (Leviticus 17:11, NIV)
This is why a lot of the Torah teaches about priests, sacrifices and the tabernacle/temple where the sacrifices were offered. The Torah teaches individual responsibility and forgiveness through a substitute sacrifice that bears our sin.
In the book of the prophet Ezekiel we see this idea as well.
(The priests) will put the most holy offerings (there) - the grain offerings, the sin offerings and the guilt offerings - for the place is holy. (Ezekiel 42:13, NIV)
Therefore Muslims are not reading Deuteronomy 24:16 or Ezekiel 18:20 in their context. These verses are not saying there is no sacrifice that can bear our sin. Instead they are saying that we are individually responsible for our sins and need to seek forgiveness through God's provision of a substitute sacrifice that can bear our sin. These verses do not support Islam at all, instead they confirm what Christianity teaches.