This problem was explored by the ancient Hebrews in the book of Job. How could God do nothing and let the righteous suffer? Originally, this was handled as a poetic debate between the sufferer and his friends (Zophar, Bildad, Eliphaz) who have different points of view. The book questions the premise that was widely held in ancient times (and elsewhere in the OT), that suffering is a punishment for sin, such that bad things befall people who have done nothing to deserve such awful things, while the wicked may prosper and triumph unfairly. Job maintains his innocence, not that he is sinless but that he did not commit any sin worthy of such punishment. As Job interacts with his friends who maintain that he must have done something of comparable magnitude, Job's conception of God evolves and changes. This is due to the dilemma he faces that (1) he knows he is innocent, yet (2) God has allowed him to suffer. Since he had done nothing to deserve punishment, and since God is so powerful that no one can plead innocent before him, he concludes that God is the source of injustice in the world:
"The arrows of Shaddai stick fast in me, my spirit absorbs their poison, God's terrors stand against me in array...May it please God to crush me, to give his hand free and play and do away with me!" (Job 6:4, 9).
"How can a man be in the right against God? If any were so rash as to challenge him for reasons, one in a thousand would be more than they could answer...How dare I plead my cause, then or choose arguments against him. Suppose I am in the right, what use is my defense. For he whom I must sue is judge as well. If he deigned to answer my citation, could I be sure that he would listen to my voice? He, who for one hair crushes me, who, for no reason, wounds and wounds again, leaving me not a moment to draw breath...This I dare to say: Innocent and guilty, he destroys all alike. When a sudden dead scourge descends, he laughs at the plight of the innocent" (Job 9:2-3, 14-17, 22-23).
"I shall say to God, 'Do not condemn me, but tell me the reason for your assault. Is it right for you to injure me, cheapening the work of your own hands...Have you got human eyes, do you see as mankind sees? ... You, who inquire into my faults, and investigate my sins, you know very well that I am innocent, and that no one can rescue me from your hand...If I make a stand, like a lion you hunt me down, adding to the tale of your triumphs. You attack, and attack me again, with stroke on stroke of your fury, relentlessly your fresh troops assail me" (Job 10:2-4, 6-7, 16-17).
Here, Job construes God's apparent benevolence and providence as mere "dissembling" (Job 10:13), that God is actually an amoral, despotic power in the cosmos bringing misery to the wicked and righteous alike. Zophar, in response, asks Job to quit his babbling and claims that God is so wise he can detect sin that Job is scarcely aware of (11:7-12), and that God's actions are guided by a moral directive. In response, Job turns this view on its head and claims that God's wisdom is best revealed in the dreadful works of his omnipotence, including droughts (12:15), floods (12:16), overthrowing kingdoms (12:17-19), etc.:
"The tents of the brigands are left in peace, and those who challenge God live in safety, and make a god of their two fists...He builds a nation up, then strikes it down, or makes a people grow and then destroys it. He strips of country's leaders of their judgment and leaves them to wander in a trackless waste" (Job 12:6, 23-25).
And on it goes like this. The book then contains two likely interpolations of speeches, those of Elihu (ch. 32-27) and Yahweh himself (ch. 38-42), so that Job does not get the last word....Elihu reiterates the position of Job's friends, and Yahweh emphasizes his preeminence over all creation and his unknowable wisdom. This pretty much muddles Job's own view, and the final redactor added the prose prologue and epilogue which explains the whole rationale for Job's suffering and gives the story a Hollywood happy ending. But the "meat" of the book is the middle part, which explores these issues in a back-and-forth between different points of view that is quite interesting to read. Never, however, is the position considered that posits God as disinterested in the affairs of men, or taking no part in Job's suffering. It seems that one either believed that God is punishing you for your sins, or God is expressing his power irrespective of justice. Since the book repeatedly asserts God's omnipotence over all creation, and his involvement in nature, the idea of God's non-involvement is philosophically quite far from this point of view. It seems that as the view of nature in more recent times has changed (e.g. as operating according to their own laws which may have been established by God, but not mechanically operated by God), so does a more Deist-like view of God's non-involvement in nature become more common.