I am also a (confused) Muslim.
We say everything that happens is written by Allah.
What about when a minor girl is raped and killed? Was that written by Allah?
Why Allah is so bad that he did so bad to a minor child?
Islam Stack Exchange is a question and answer site for Muslims, experts in Islam, and those interested in learning more about Islam. It only takes a minute to sign up.Sign up to join this community
When it is said, “everything is written by Allah”, what is meant is everything is known by Him. Now, I get the gist of your question: If He knew a horrendous thing was going to happen why didn‘t He intervene and stop it?
This is my understanding of the matter:
Our lives on earth is a trial. The core essence of the trial is “how will we exercise the limited free will that Allah has granted us?” And, essentially, on the Day of Judgment, we are going to be called to account for the decisions we made while we were in the Dunya.
Think about it brother -- every action that we take, and every move we make, boils down to our having made a decision (and that decision is an exercise of free will).
From the very beginning, with Father Adaam and Mother Eve (a.s.), Allah has wanted to guide mankind in the exercise of our freewill and in the making of our decisions. And from the beginning mankind has been rejecting that Guidance and getting in all sorts of trouble for it. (7:11 - 25).
The reason Allah would allow that child to be raped is because He is not inconsistent and arbitrary. He does not allow us to use our free will to do only good deed and mildly bad deeds. He allows us to do despicable and atrocious deeds too. I personally believe that burning sincere believers alive SIMPLY BECAUSE THEY BELIEVE IN ALLAH and murdering a prophet of Allah are far worse acts than raping a child, but He has allowed even these things to happen to His devotees and chosen deputies (85: 4 - 10 and 2:91).
Allah has ordained that it is OUR job to intervene and stop wrong-doers from committing atrocities.
“and if Allah did not check one set of people by means of another there would be much mischief on earth”;
“and why should you not fight in the cause of Allah and of those who, being weak, are ill-treated - men, women and children, whose cry is, ‘our Lord! Rescue us from this town whose people are oppressors. And raise for us from You one who will protect, and raise for us from You one who will help!‘”
I leave you with this thought: We see much wrong being done and going unpunished in this Dunya, but nobody gets away with anything in truth. Everyone will have to stand before Allah on the Day of Judgment and give answer for all their crimes. And, unless Allah forgives them, they are going to burn in Hell for all their rapes and murders (and other crimes) FOREVER.
In the words of Allah Himself,
“will not the unbelievers have been paid back for what they did?”
I hope this answer satisfies the indignation you feel in your heart.