Descartes was a frightened asshole (not blaming him for that, church wasn't particularly benevolent at that time in history)... he basically killed god, and then chickened out. Guess Nietzsche had to come later on and finish the job.
Both had systems in which God was important, and both seem more devout than the average for their era.
Actually, god wasn't important at all in his thinking system. "Cogito ergo sum" is a humanist approach to existence, and is basically the beginning of what later on would evolve towards Sartre's existencialism (though this is my opninon, some might think otherwise). God appeared as a sort of appendix, to prevent him from getting crucifixed or burnt to death by the catholic church.