One of the questions I have struggled with for a long time is why God allows bad things to happen to good people. It's my question of the soul that I ponder on and ask God about often. I remember meeting a guy on my mission who had stopped believing in God because "if there was a God, why did he allow the Holocaust or Rwanda?" He continued by saying he had seen a lot of bad things happen in his lifetime and these things had caused him to disbelieve the existence of God.
I am still working on understanding the answer to this question. I know that God loves all His children. He gave us agency so that we could choose for ourselves. Sometimes, the consequences of those choices lead to bad things in our lives. Other times, the trials and suffering come seemingly unprovoked. Either way, God still loves us. Think of the Old Testament story of Job. God says, "There is none like him in all the land." The Lord loves and trusts Job, and yet allows him to be tried beyond anything I could bear. He loses his children and his wealth. His friends turn against him. His wife turns against him. Why? His friends tell him that it was because he had sinned and displeased God. We know that isn't the case. Job did good things, was a righteous person. Why, then, did these things happen to him? God sought to bless him. The scriptures teach us that "whom the Lord loveth, he chaseneth." Sometimes that's the reason these things happen.
The Lord seeks to help us grow and that involves stretching us. Remember what it felt like in junior high when you were shooting up like a sprout? You had growing pains. That's the closest analogy I can think of to explain why bad things happen. Sometimes, God is helping us grow and it hurts, but we pull through and are better for it. (For a good analogy of this, click HERE)
Sometimes I think to myself, "Heavenly Father, I'm not quite sure what you are doing. I don't think I can handle what I'm going through." Do you ever find yourself wondering if God ever asks too much of you in your trials? Sometimes I do. True story. At one point on my mission, there was about three weeks where terrible things were happening in the lives of people I love. Worst part of my mission. I don't think I had a sincere prayer with Heavenly Father during that time. Most of the time it was just anger that I spouted at Him. I kept asking, "Why are you doing this to them? Why are you making me experience this? What's your problem?" To this day, I don't entirely understand those three weeks.
A BYU professor, John Tanner, wrote, "[The Book of Job] does not answer the question, 'Why does God permit suffering to come to his children.' But it does answer the question, 'How shall we respond.'" He continues by saying the one sure way we come to find answers and peace in our suffering is to seek revelation from God. We have to commune with him. "Apart from what the Lord says," John Tanner continues, "the fact that he speaks to Job at all fulfills Job's deepest need -- to be reassured that God has not forsaken him."
In times of trial and suffering, go to God and seek His voice. It will come. It will reassure. It will comfort. I love the words to the hymn What a Friend We Have in Jesus: "What a friend we have in Jesus, all our sins and griefs to bear; What a privilege to carry everything to God in prayer!" The third verse is my favorite: "Are we weak and heavy laden, Cumbered with a load of care? Still the Savior is our refuge; Take it to the Lord in prayer! Do thy friends despise, forsake thee? Take it to the Lord in prayer! In his arms he'll take and shield thee; Thou wilt find a solace there."
The man who wrote that hymn, Joseph Scriven, knew a lot about enduring suffering. Twice, he was engaged to be married, and twice right before the wedding, his fiancée died either from sickness or an accident. Driven to grief, he penned those words. He understood where to turn for peace.
I'm sorry that I couldn't provide more answers to the great question of the soul. I wish I knew the answer to every question, but I don't. The Lord does. Go to him. Thou wilt find a solace there.
PS -- I wrote most of this post before General Conference. This was one of the questions I had on my mind. Two of the talks that were given addressed this topic. They were given by Elder Kent F. Richards and Elder D. Todd Christofferson. They were literally answers to prayer.