The late philosopher, J.L. Mackie, is famous for his exposition of the problem of evil. There are two main kinds of this argument – one is deductive (known as the “logical problem of evil”), and the other is inductive (the “evidential problem of evil”). We will focus our time examining the former version, set forth not only by Mackie, but by some other atheistic philosophers.
The problem of evil is not meant to demonstrate that there is no God, or no Creator. Rather, the argument is meant to show that, given the reality of evil, the existence of an all-powerful, all-knowing, and perfectly good being is impossible. If this argument is correct, a deity may still exist, but it won’t possess all of these attributes. The argument may be formulated like this:
1. If an all-powerful, all-knowing, and perfectly good being exists, evil does not exist.
2. Evil does exist.
3. Therefore, an all-powerful, all-knowing, and perfectly good being does not exist.
For the sake of brevity, we will simply call this being, “God.”
(2) is usually granted, but there are some philosophers who think of evil not as an actuality, but merely as a privation. In other words, evil is simply a lack of goodness, rather than some positively existing thing in and of itself. Let us bypass this for now, and instead focus on (1). The typical Humean formulation asks why evil exists if God is capable of eliminating it, knows it exists, and wants to eliminate it.
Alvin Plantinga is generally given credit for decisively refuting this argument by postulating what is known as “transworld depravity.”  What he suggests is that, given human freedom, God is not capable of forcing anyone to freely choose what is good. This does not affect God’s omnipotence, since that attribute only means that God can do all logically possible things (i.e. a square-circle is not a logically possible thing, so God cannot create one), and forcing someone to freely do something is a logical contradiction. Now, if human beings choose to do evil in every world in which they are created, then there is no world in which God creates humans without there being evil.
The question now is this: why doesn’t God create a world in which there is no human freedom? This question, however, presupposes that a world without evil, but also without freedom, is better than a world with freedom, but also without evil. If this is one’s position, then the issue of question-begging becomes pertinent. It is at least reasonable to suppose that a world with both freedom and evil is better than a world without either.
The above explanation is really just one of many. The ultimate refutation of the logicial problem of evil entails the addition of just one more premise – namely, that God has a morally sufficient reason for allowing evil. This is true even if we don’t know what that reason is. Hence, atheistic philosopher, Michael Martin, admits, “the conjunction of the following three statements [1. God is all-powerful and all-knowing; 2. God is all-good; 3. Evil exists] is not inconsistent.” (Emphasis in original).
 Alvin Plantinga, God, Freedom, and Evil, Eerdman’s Publishing, 1977 edition.
 Michael Martin, Atheism: A Philosophical Justification, Temple University Press, 1990, p. 341.