This is the age-old question every spiritual seeker wants to know.
I've talked to a number of people who have watched a loved one suffer in some way, and who have found it difficult to believe that God--if there is one--could be considered good, yet allow such misery.
I think their reasoning is valid and worthy of humble explanation.
When you and I think of the word "good," we tend to think happy thoughts such as: love, joy, peace, comfort, confirmation, acceptance, etc. What we don't equate good with is suffering. Suffering and pain, in our eyes, are never good.
Therefore, when you and I throw God--whom we are taught is good--into the equation, then our minds cannot fully wrap around the thought of a good and loving God allowing bad things to happen. It just does not compute.
Understanding Good...and God
To understand this mystery, there are a couple of things we have to take into account. First, what is good?
The Bible gives us the definition of good in the following few verses:
"And Jesus said to him, 'Why do you call me good? No one is good except God alone.'" - Mark 10:18
"Oh give thanks to the Lord, for he is good, for his steadfast love endures forever!" - Psalm 107:1
What we see from just these three (and there are many more) verses is that God alone is good. We are not good. We go our own way and do our own thing, but God's love is steadfast. It stands firm forever.
Another verse I find helpful is this one which says:
"For my thoughts are not your thoughts, neither are your ways my ways,” declares the LORD. “As the heavens are higher than the earth, so are my ways higher than your ways and my thoughts than your thoughts." - Isaiah 55:8-9
This tells us that when we say God is "not good," then we are hastily placing judgment through our own skewed and limited mindset. Our thoughts and ways only cover a shadow of the reality of God's thoughts and ways. Therefore, we cannot objectively say that God is not good for we do not understand even half of what He is thinking, doing, etc.
We forget to take sin into account
Another thing we humans do regularly, is overlook sin. We've become so good at it that not many people even mention it anymore, including pastors. Why should we? If we don't talk about it, it doesn't exist...right? Wrong.
You and I live in a sinful, fallen, broken world. Just take a look around. The "good" things God created in the beginning have been marred down by sin. Even the beautiful things such as nature have been altered from their original creative state and intention.
Take for example the animals. Did you know they were all vegetarians to begin with? Crazy to think that ole T-Rex actually enjoyed a good salad, but he did!
In Genesis 1:30, God says this, "'And to all the beasts of the earth and all the birds in the sky and all the creatures that move along the ground--everything that has the breath of life in it--I give every green plant for food.' And it was so."
Further, verse 31 says, "God saw all that he had made, and it was very good." This was true creative perfection before the fall of man.
Just answer the question
Okay, so let's look back at the question: Why does a good God allow suffering? Well, the reason is not an easy one-word fix. Suffering was never part of the original plan, but we (humans) messed it up.
Now, God allows suffering for a variety of reasons. Take for instance the Old Testament character Job. In a matter of one day, Job had his oxen and donkeys stolen, his servants were put to the sword, the fire of God fell and burnt up his sheep and servants, another raiding party took his camels and killed those servants, his seven sons and three daughters were killed when their roof fell in on them, and then Job was struck with painful sores. (Job 1)
Can you say suffering?
Job's difficulties were allowed by God so that Job's faith could be tested. This didn't make the tests any easier, but it made Job's faith all that much stronger, and in the end, he admitted God knows all things; that he (Job) had spoken out of turn by questioning God's motives; and his (Job's) knowledge was limited about the situation. Because of Job's faith, God blessed Job twice as much as before.
Sometimes God allows suffering to teach others lessons through the pain. My boss's wife was one of the most gentle, kind, and loving souls, yet she suffered for three years with ovarian cancer. The last six months were horrendous, in that she could not eat without being sick, could not sleep, could not move without excruciating pain, could not keep anything inside her, and was bedridden. Yet, her faith stayed intact. She still worshipped God, still told others about Him, still prayed for her family, etc. Her faith left such an impression on the doctors and nurses, that I'm sure they still talk about her to this day, and perhaps, a few of them now have a relationship with Jesus because of it.
The answer to the question basically is, God uses our sufferings for a greater purpose. We may not know what that purpose is this side of heaven, but how you and I journey through the suffering and what we do with it says so much to all the onlookers who are watching to see how we handle it.
Of course, no-one wants to suffer. I pray that you will not have to experience any traumatic events in your lifetime, but if you do, just know that God is with you; that He still loves you; and that He has a greater purpose for the pain.