This is an enormous and complicated, even controversial, question. According to one narrative, America is a Christian country, founded by English refugees (the Pilgrims, Puritans) looking for freedom of religion, and it is these Christian/biblical values and morals that define America. In this sense, the early texts of America are about religion as a force for community, social order, and political unity. The first texts were largely religious ones, as fiction, poetry, and drama were all viewed with skepticism. This dynamic makes William Bradford's "Of Plymouth Plantation" an important, if difficult to read, early example of American literature.
The first American poets, Edward Taylor and Anne Bradstreet, were Puritans. Taylor was even a minister. As a woman, Bradstreet, despite her faith and poems about marriage, was met with some criticism from those who didn't consider literature a proper realm for women.
When American literature really started to flourish in the 19th century, religion would be treated with considerably more ambiguity and skepticism. This approach is best exemplified by Nathaniel Hawthorne, who came from Puritan stock and had a relative who was a judge at the Salem Witch Trials. In his masterpiece The Scarlet Letter, the main character Hester Prynne is punished literally and figuratively for her sins. She and her daughter exist in the community, but they are also conspicuously excluded from it. The ways religion can be used to punish the individual and the hypocrisy of religious communities are two of the major themes found in Hawthorne's work. Hawthorne's contemporary, and one-time neighbor, Herman Melville, would also criticize Christian hypocrisy in his early South Seas adventure novels, Omoo and Typee, which also offer up sympathetic—for the time period—portraits of "pagan" societies.
Given the constraints of space, I would also suggest looking at the Transcendentalists (Henry Thoreau, Ralph Waldo Emerson, Margaret Fuller), who broke with traditional organized religion in their quest for a much more individual, personal spiritual truth.