Firstly: The Bible informs us that God is not cruel. He takes no delight in seeing sinners suffering in hell. Ezekiel 18:31,32 - "Cast away from you all your transgressions, whereby ye have transgressed; and make you a new heart and a new spirit: for why will ye die, O house of Israel? For I have no pleasure in the death of him that dieth, saith the Lord GOD: wherefore turn yourselves, and live ye."
Lamentations 3:32-36 - "But though He cause grief, yet will He have compassion according to the multitude of His mercies. For he doth not afflict willingly nor grieve the children of men. To crush under His feet all the prisoners of the earth, To turn aside the right of a man before the face of the most High, To subvert a man in his cause, the Lord approveth not."
In the Book of Jonah, we see how merciful and caring God is even for little children: Jonah 4:10,11 - "Then said the LORD, Thou hast had pity on the gourd, for the which thou hast not laboured, neither madest it grow; which came up in a night, and perished in a night: And should not I spare Nineveh, that great city, wherein are more than sixscore thousand persons that cannot discern between their right hand and their left hand [i.e. children]; and also much cattle?"
Secondly: The Bible tells us that every man deserves punishment for sin (Romans 6:23; 3:23). Infants are not innocent, because, even though they may not have committed sin, they are already born in sin - they have inherited the guilt of Adam’s sin (Romans 5:12) and the sinful nature from their parents. Psalm 51:5 - "Behold, I was shapen in iniquity; and in sin did my mother conceive me." As a father of two children, I can testify that babies begin to show their sinful nature at a very early age. No one has to teach them how to sin. It is natural for them.
Thirdly: The Bible shows us that God’s judgments are not meted out indiscriminately, but always in proportion to the offence. E.g. in the case of the Amalekites, the cause of the judgment is found in Exodus 17:8-16 and Deuteronomy 25:17-19. The Amalekites were cruel to launch a surprise attack on the Israelites from behind. The ones traveling at the back of the Israelite camp that marched to Sinai were the lame and elderly, who could not keep up with the rest. They massacred these helpless people and they "feared not God." Hence the punishment they received was fully deserved by them.
The same is true with all the heathen nations that God commanded Israel to kill. They were being judged by God for their awful sins. In fact, God gave them time to repent but they did not do so. He endured and tolerated their sins until they were ripe for judgment.
The amazing thing about God’s love is that it is shown to us even when we are deserving of judgment. Romans 5:7,8 – "For scarcely for a righteous man will one die: yet peradventure for a good man some would even dare to die. But God commendeth his love toward us, in that, while we were yet sinners, Christ died for us." We must tell the unbeliever that it is only when we understand God’s wrath against sin that we can understand God’s love for unworthy sinners.