I often hear people mock the morality of the Bible by pointing to passages where God commanded Israel to go to war against its enemies and kill all its men, women, children, and livestock. From the perspective of an unbeliever who also does not believe in life after death, I can see why they would find this horrific.
However, the reality is that there is life after death and the only thing in question is where we will go. This fact that God commanded Israel to kill women and children I contend was not immoral, but an act of great mercy.
You see the Bible teaches that children who have not reached the age of accountability (which varies from person to person), are covered by the blood of Jesus Christ. If these children were allowed to live and grow up in their Pagan culture carrying the bitterness that Israel killed their fathers, they most certainly would have rebelled and fought against the God of Israel. At that point they would be at the age of accountability and if they died in that sin they would have been condemned to Hell. However, because God took them before that could happen, they were ushered into heaven by God's grace and mercy. This is a decision that only God can make, so this does not justify abortion. God never commanded the USA to kill millions of babies in the womb.
As for the adults of these lands, they had plenty of time to repent, but persisted in attacking Israel, so God brought judgement upon them. Again, God will judge each of those people according to what they knew as well.
So using the morality argument to take apart the Bible is a losing battle, because unbelievers do not take into account there is more to our existance than just what we see in this life. God sees the whole picture and acts in the interest of eternal purposes rather than just what benefits us in this life.
Additionally, God does not command the church to kill anyone. He only worked this way with Israel on a national level to protect His chosen people and chosen land. He did this to keep the line to the Messiah pure, and to establish His prophetic purpose. Again this was a different dispensation, so the moral laws of God remained the same, but the consequences for their violation were different.