In formulating a response to the problem of evil and suffering St. Augustine of Hippo (354 - 430 CE) has essentially set the benchmark, and most (if not all) theologians have been either affirming or refuting his ideas ever since.
To begin understanding Augustine's theodicy one first needs to examine his ideas in light of two major influences in his life. The first is MANICHAEISM (established by Mani 216-76 CE), which was a sect Augustine was associated with for some time. Manichaeism was a Gnostic faith which emphasised the duality (separation) of darkness and light. This duality was expressed in two eternal principles - matter and God - and both were opposed to each other. Escape from the bonds of the physical world (matter) was said to be the aim (or purpose) of humanity. Augustine eventually became disillusioned with Manichaeism and, as a result, began to reject the notion that evil is an independent and corrupt substance.
The other important intellectual influence in his life was the teaching of Plotinus (204-70 CE). Plotinus was an NEO-PLATONIST who taught the goodness of creation and the chaotic nature of evil. Augustine also lived quite a sensuous lifestyle before he became devoted to the Christian faith, so it might be said that having experienced the excesses of drinking and sex that his theodicy was an inevitable kick-back against what he felt was an unsatisfying way to live life.*
'And God saw that it (really) was good'
For Augustine, God is the source of everything. He also believed the world had been created literally out of nothing (ex nihilo), and according to the Divine Will. This meant that as far as Augustine was concerned, everything in the world was created good, or perfect. He also believed that although there is an abundance of variety in the world, that this was in fact planned and coherently ordered ('God saw all that [God] had made, and it was very good' (Genesis 1:31 [Bracket mine])).
So as far as Augustine was concerned, all creation is good despite the appearance at times that things might be otherwise. Creation also expresses the perfection of God's creativity and goodness. Logically this means there is nothing evil in the world because God did not create anything evil. However, as something created (and contingent) the world and everything in it is able to become 'corrupted' (or become less than what it should be). This is because the world was not created out of anything that has always existed (such as God), for if it had been then it would have inherited its eternal and immutable characteristics.
Evil: A (re)-definition
So having said that matter is something essentially good, but also something able to be less than what it should be, what does the notion of 'evil' mean? Well, evil must now be understood as the PRIVATIO BONI ('privation of good'), or that which occurs when something deviates from its purpose in the order and structure of creation. In other words, something becomes 'evil' when it ceases to be what it is meant to be or stops doing what it is meant to be doing.
This means for Augustine, evil is a deviation from good. There is no evil thing or substance because God only created good things. It is, therefore, impossible for a totally evil thing or being to exist. This means that even evil things must have at least some good in them.
"What, after all, is anything we call evil except the privation of good? In animal bodies, for instance, sickness and wounds are nothing but the privation of health. When a cure is effected, the evils which were present (i.e. the sickness and the wounds) do not retreat and go elsewhere. Rather they simply do not exist any more. For such evil is not a substance; the wound or the disease is a defect of the bodily substance which, as a substance, is good." (Augustine)
So according to Augustine, to exist is to partake of goodness (Being), and where there is a lack of goodness there is a lack of being. In other words, only good things exist; evil things do not (and logically cannot) exist!
The problem with having free will is...
Augustine's belief that 'sickness and wounds are nothing but the privation of health', seems logical when it comes to illness, and may work on a number of levels elsewhere. But if this is the case, where did the ability for things to become corrupted first begin? Well as far as Augustine is concerned, evil entered the world as a result of the wrong choices of free beings (free in the sense that there was no external force necessitating them to do wrong). In other words, corruption occurred as a result of free will.
The freewill defense finds support from the first book of the Bible. In Genesis chapter 3 we read that when Adam took and ate the fruit from the tree of the Knowledge of Good and Evil. However, this was not because Satan tempted him, but because he already had a corrupted heart:
"When the will abandons what is above itself, and turns to what is lower, it becomes evil - not because that is evil to which it turns, but because the turning itself is wicked." (Augustine)
Within (Augustine's) Divine order of things, the angels in heaven partake of the highest degrees of goodness. However, some of these were said to have revolted against God, before the creation of humanity. Thus, there exists two rival camps in the heavens and the earth. One seeking to follow the ways of God (the City of God), and one seeking to follow their own desires (the City of the World).
So taking all this into account, we have the foundations for Augustine's theodicy set in place. God, although omnipotent, omniscient and all-good, and despite creating the world and everything in it to be good, is innocent when it comes to the presence of sin and evil in the heavens and the earth, as this occurred as the result of the freedom for both humanity and the angels, to make their own decisions.
NOTE: Augustine believed that despite our corrupted natures, God still shows that God loves us, because God will still save people if they want to be saved (despite the fact that no-one deserves this 'act of grace').
* For more on this see The Confessions.