Freedom of thought will best be promoted by that gradual enlightening of the human understanding which follows the progress of science. I have therefore always avoided writing about religion and have confined myself to science.
Charles Darwin, 1880
The Life and Letters of Charles Darwin (F. Darwin, Ed.)
(…but see comments below!)
Although Darwin undoubtedly did avoid writing about the thorny, old subject of religion, he did occasionally make passing comment on the subject, such as in this passage from The Voyage of the Beagle:
A strong desire is always felt to ascertain whether any human being has previously visited an unfrequented spot. A bit of wood with a nail in it, is picked up and studied as if it were covered with hieroglyphics. Possessed with this feeling, I was much interested by finding, on a wild part of the coast, a bed made of grass beneath a ledge of rock. Close by it there had been a fire, and the man had used an axe. The fire, bed, and situation showed the dexterity of an Indian; but he could scarcely have been an Indian, for the race is in this part extinct, owing to the Catholic desire of making at one blow Christians and Slaves.
In their book Darwin's Sacred Cause, Desmond and Moore claim, with more than a little supporting evidence, that Darwin's abhorrence of slavery heavily influenced his scientific thinking. It was certainly a subject very close to his heart—which perhaps goes some way to explaining his uncharacteristic dig at religion in the above passage.