This question is usually asked by atheists, but the first problem is that they have no objective moral standard by which they might say God's judgment is right or wrong. They may not like it. They may not approve of it. But these objections and preferences are irrelevant as to whether or not God is right or wrong for damning people eternally. The only way they can rationally assert that something is morally right or wrong is to appeal to moral standards outside of themselves. If the appeal is to what society says, this is dangerous since societies change and morals can become right in one generation and wrong in another.
Second, God is not the one torturing. To torture someone means to be actively involved in the action of inflicting pain. But God does not do this. God sends people to hell, and they are tortured there due to the consequences of their sin and their rejection of God.
God has the right to execute judgment upon all people who would reject the only means by which they can be delivered. That means of delivery is God himself becoming one of us, dying for our sins, and rising from the dead three days later. Those who reject that are left with the consequence of the rejection which, if you think about it, is the greatest insult to God. After all, they rejecting the greatest sacrifice. So, they get the greatest punishment.