Proposed theistic explanations are constrained by a presumption of rationality. An agent is acting rationally in pursuing a particular goal if she acts consistently with her beliefs and desires, in a way which is likely to attain the goal, and which requires the least expenditure of time and effort. This gives us three criteria of rational action: consistency, efficacy, and efficiency. But what does this mean when applied to God? After all, God is no ordinary agent. The key question becomes: What would be the most rational way in which an omnipotent, omniscient, and morally perfect agent could bring about his intended goal? On the assumption that God is a rational agent, we can assume whatever he wills, he would choose the best possible means of achieving it. This is the optimality condition, and the concept of God coupled with the presumption of rationality entails it. This is the most important constraint on a proposed theistic explanation.
It is important to keep in mind though that optimality is always measured against some goal. It is up to the theist to nominate just what that goal is. Given some posited divine goal, then we should ask: Is the explanandum the best way in which this goal could be realized? If not, then we cannot plausibly attribute it to God. An atheist could discredit a potential theistic explanation simply by arguing that there exists a better way in which God could have achieved his goal, and thus, some explanandum cannot be attributed to God. If a proposed theistic explanation cannot meet the standard of optimality, it has no explanatory force at all.