To question God is not wrong. This is clear due to occasions in the Bible in which people asked God questions and He was not offended or angered. For example, the book of Habakkuk largely consists of a question and answer format in which the prophet Habakkuk asked God questions regarding His toleration of wrong and God answered with future predictions of His justice. For example, Habakkuk 1:2 begins by asking, "O LORD, how long shall I cry for help, and you will not hear?" The Lord answered with prophecies related to how He would help in the future.
Is it okay to question God?
The Psalms offer another important section of Scripture that ask God many questions. These lyrics often seek wisdom or justice. While answers are not always provided, there is no criticism given in Scripture regarding such questions.
The book of Ecclesiastes is yet another book in which the author (traditionally Solomon) asked difficult questions about life and sought to find the answers to them through various methods. In the end, the conclusion is given to "Remember also your Creator in the days of your youth" (Ecclesiastes 12:1) and to "Fear God and keep his commandments, for this is the whole duty of man" (Ecclesiastes 12:13).
Even the heavenly vision of Revelation 6 offers insight into God's attitude toward questions. Those who had been slain for their faith ask, "O Sovereign Lord, holy and true, how long before you will judge and avenge our blood on those who dwell on the earth?" (Revelation 6:10). God responds with a call to patiently wait until the proper time.
There is, however, a difference between sincerely asking God questions and accusing God of wrongdoing. Such an attitude would be wrong, as God is perfect and never sins or lies (Hebrews 6:18). He is not tempted, nor does He tempt others (James 1:13).
For example, Jonah turned angry when God showed compassion to the people of Nineveh and chose not to judge them and destroy the city as He had commanded Jonah to preach. Jonah 4:2 shares, "O Lord, is not this what I said when I was yet in my country? That is why I made haste to flee to Tarshish; for I knew that you are a gracious God and merciful, slow to anger and abounding in steadfast love, and relenting from disaster." God was not pleased with Jonah's response, but instead noted the importance of His compassion upon those who repented at Jonah's preaching (Jonah 4:10-11). A similar interaction can be seen between God and Job (Job 38-42).
Coming to the Lord with our questions and concerns is not wrong, but is rather normal and healthy. However, we must come to the Lord with respect and honor, realizing He is perfect in wisdom and knows all things. He may not always reveal the answers to our questions, but provides exactly what His people need to know to live for Him (Deuteronomy 29:29).
Does God make mistakes?
Does God change His mind?
Why does God allow evil?
Can Christians feel disappointment with God? Is it wrong to experience disappointment with God?
How do I get the image of God as being angry out of my mind?
Truth about God