God, when believers doubt, has to be explained and excused for the ills of his kingdom; because he is omniscient, he can everything, and he is all-good too. That creates obligations; He is also expected to do something, as He can everything. So must do any replacement to God.
Science did all it could to get rid of God, for the reason that Religion hindered its progress. Therefore it fought against the dark side of religion, for a luminous reign of reason.
Science taught us not to serve God but to serve humanity instead. Or... was it humanity? Perhaps something else, more abstract, more general, like Truth and Knowledge for Knowledge's sake?
With reason and proven merit, Science rose to disenchant the world  from unreal dreams and hopes and man-made values. To vanquish Inquisition, it chose to replace God. It was very successful in this. The same way as the religions - particularly the monotheistic ones - instituted a deity-centred view of the world which gave a special meaning, coming from above to human life, Science brought a new perspective and new explanations to it. Nowadays the new vision reins; we believe in Science.
Today most people - including the believers in divinity - have confidence in whatever reputed scientists affirm and follow most of their advice; but not because scientists justify belief with facts and reason (which they do). Not because science offers experimental proofs. Not because Science thinks properly. The reasons and facts of science, its proofs, its theories of everything, became much too complicated and out of reach for the common mortal mind; almost as far away as the Heavens. Verification can not be produced in the presence of each individual. Lay persons cannot test scientific knowledge with their senses, and certainly not with their commonsense mind. We all believe the scientists, their witnessing, because we have faith in them. We also believe the long chains of witnessing about their witnessing.
People trust science because its explanations make reason for other people they trust and even more because it gave fabulous technological result. It changed the world, we have no doubt. People believe scientists because this is the ideal they received with their school-baptism; by habit, imitation and trust, because science has unquestionable authority; as they believed the priests before. And that is enough. Or is it?
Like God, Science is omniscient, omnipotent and beneficial.
Science is omniscient – potentially. We learn in school that knowing everything is only a matter of time; the advance of knowledge is inexorable.
Science is also omnipotent – potentially. As the miracles and speed of technology show, yesterday’s impossible is possible today or will be tomorrow.
Science is good too, it can fix anything, solve all problems. Who would dare say that science is bad?
But Science is good, in its own impartial terms. It is good because it freed our mind from superstition which was exposed to be badness and obscurantism. It proved to be so useful to us to achieve things with its power, easing and lengthening life; Science is good because it promises the ignorant freedom of increased power by means of knowledge, knowing how things really are and how they work, knowing what we do, to serve intelligent action and progress. At this point in Western History we have faith and hope that the Universe, the species, our world, history advance one-way, from worse past to better future. We still do. Additionally, Science is also just because it serves impartial Truth impersonally, "objectively", reality as it is, the new ultimate value. When Science says "I am the one who tells you how things are", we can hardly oppose this incredibly arrogant statement; who else could dare such haughtiness without being rejected as pure hubris?
Science is very promising, indeed:
it reassures us that there is order in the Universe and in our world, that the world is understandable and coherent,
that everything is foreseeable by laws and statistics.
Moreover Science promised us - and proved in part - that we are powerful, the strongest; we can change our world, even the planet. So strong that we can even destroy it.
Science is our great, impersonal, disinterested, servant who knows what is good for us "un ami qui vous veut du bien".
Beyond this (slightly ironic) homage of merit, a second thought haunts me: is Science not slipping into serving something else, instead of us, say, Truth and Knowledge for their own sake? Ideas? Power and domination of yet another creed? Another totalitarian idea instead of wisdom for the sake of human happiness?
In fact, science is non-moral, beyond moral, beyond good and bad, because it is impersonal. It overpasses the merely human. Unfortunately, science did not discover yet the the material particles and waves and causalities from which Moral values and unifying understanding are made. It does not feel a need for such hypotheses. What? Does this sound a nietzschean ring?
I mind my words: Our present God, our dominant creed for the last century, Science deserves, needs, to be defended, urgently, before the new century turns away from science and reason, slips back towards faith or who knows where, because of an unsatisfied need to believe or by the rampant idolatry of technology or equally rampant worship of "nature";
Competent theologians of Science, not activists, not the devout, must face some accusations, do their work and prove them false, in understandable terms:
If Science is omniscient, omnipotent and good - and omnipresent too - why is there so much evil, misery and injustice in the world where it rules?
Since Science, like God, knows potentially everything, can potentially everything, and is certain to be good and as it leaves no space for alternative views of the world to share the burden, the high priests of science will have to explain us why is it that this world conquered by science does not become more understandable, better and happier?
Why is the human being still so wretched?
Why are we still such fools?
Why aren't people with science better ?
Why is humanity so stupid after learning so much truth?
Why do we - all humans together - still behave like a species instead of acting like a Mind endowed with reason?
Why do we seem to head to destruction?
Why is our civilisation so weak and the new barbarianisms so vigorous?
What is the wisdom science teaches to each of us in order to live a life worth living? Is our knowledgeable science wise in her understanding of the world? Is Science wise in what it does with its huge knowledge? Is it able to control what it does?
Someone please stand up and defend Science, convincingly; not against the irrational, dark enslavers of freedom of thought, knowledge and speech but from the accusation of arrogance, narrow-mindedness, amorality, irresponsibility and wrongdoing.
Please, explain in understandable words of common sense the impression contemporary science gives, of believing that as everything which can be known must be known, so everything that can be said must be said and everything that can be done must be done.
Isn't this playing god? Isn't this the old recipe of tragedy?
Why are scientists working so well for the worst causes?
Who keeps the priests of science free of corruption and vice?
Why does science serve so obviously greed, power and violence?
Why is science ruled by money and politics if it is so sacred?
Why does science serve ambition, dispute and pride?
Why is science such a permanent danger of unleashing something that cannot be stopped and which would result in the destruction of humanity and even of the planet?
Why is science so intolerant with the inevitable and omnipresent fact of human error and ignorance? Why is it so incapable to coexist with religions which did their part in the growth of Civilisation and which proved to survive much longer that Science did? Why is it - in the name of its own unique truth - exactly as intolerant as the religious bigots are with each other?
Our disobedient critical sense needs answers to all this.
Religions promised us good news, with charisma but without proof, always undecidable placed later and higher; that good actions are rewarded and bad ones punished, that we will live after death, forever, in a better world. Hope. We need hope. We need to believe. That is scientifically proven. We will follow anybody to gives us hope and understanding. We need good news.
What is the good news of science? That we are not souls but mere biological machines made of spare parts good to harvest and sell? That death is annihilation, and even the Planet, nay, the Universe is doomed with no big future ahead? That our whole history is a little spit compared to the Big History of Earth and of life on it? That in the Infinity, in this Cosmic Year 15,000,017,000 (as of 2015 CE)  we are specks of nothing, so that in good reason, nothing really counts whatever we achieve or do? That nature’s way is the law of the strongest and the selection of the fittest the more productive? Where is the hope in all this?
Do we science-bred generations need to pray in equations and wait for a techno-future life or a last judgement revolution after which all will be well in a better world protected from us? Do we need to fall back all the way into barbarianism for our survivors to start again, another civilisation of hope?
Maybe a theodicy of science will be, after all, easier to do than God's: science does not really know all yet, cannot all, yet, it only hopes to do more and more, with humble, hard work, in an ever receding future, all being well before the implosion of the Universe. Maybe it cannot be all-good either because it is human, so human: or because it is not human enough, yet.
Not science, but persons, certain scientists, and stupid followers of dogma do evil with science exactly as some believers do wrong in the name of God.
On reflection, it could be made more clear for the mortals that Science is not God, perhaps that it is merely one major human endeavour among several others, limited to what it does well. I may be able to recognise it with modesty.
It takes courage and honesty for younger people but it is not impossible to learn to say "I do not know" from time to time.
Maybe science should confess and draw clearly, officially, its limits and borders, the many important things that are not its business without denying the existence and the importance of those non-scientific domains. Then it would not need a theodicy. The silly confusion of considering Science decisive for everything could be dispelled.
Some will brush my critique aside, saying that I did not understand, that my mind is clouded by superficial impressions, ignorance and vulgar irrationality, but I say that this is how I understand it**, and other people may think silently the same in a quietly growing spiral of silence . A dangerous spiral, I would say.
Like it or not, a theodicy of science spoken in simple words is timely. I hope a saviour Nobel prized genius will rise who will do it soon. With the risk of being shunned, snubbed and burnt.
Why do I write this?
To defend the ground under my feet! I grew up with Science, led and protected by its ideals of free thought. Now I see signs of its view of the world declining into another disenchanted ideology, that brings another end of era. If Reason keeps being too proud publicly (I believe that the best scientific and philosophical minds know better that that in private) then pride will be as usual the one before the fall; it will fall to the worst enemies of us all - the Beast.
There may be more truth than merit in criticising the un-wisdom of science in the XXth century, but I feel deeply that this work must be done, in the interest of Science and of Reason, for the dignity of Man. Science deserves to be defended. A time of changing idols seems to come again. A troubled century ahead for our children.
Good luck, my Son!
* Universum Heikenwaelder Hugo, Austria, www.heikenwaelder.at
 Weber, Max (1919), Le savant et le politique, Paris, Union Générale d’Éditions, 1963, p 14
 Corfield, Penelope J., Time and the shape of history, Yale University Press, New Haven.., 2007, XIX: "it would be possible to start a year-count from the scientifically calculated origin of the universe some 13 to 15 billion years ago (defining a billion as a thousand million), and then to scroll forwards from that. It would offer a daily reminder of the vast extent of past time. So 2000 CE would equate to Cosmic Year 15,000,002,000 plus or minus an error range of 1–2 billion.
 Elisabeth Noelle-Neumann, The Spiral of Silence, University of Chicago, Chicago, 1984
**I would prefer not to be stoned or burned, according to time-honoured traditions, for my words against the divinity of the day. If needed, better drown me in silence. We are civilised people, aren't we?