Most presidents are in some way religious. There are some presidents that are more religious than others. In the case of Abraham Lincoln, it depends on when you are talking about. Lincoln was born into a religious family. His mother and father were very religious. He did not belong to a Church at all times in his life, but he remained religious.
Lincoln knew the Bible very much. He would recite parts of the Bible in his speeches and conversations. There were times he would go to church with the rest of his family as an adult. Lincoln experienced heartache in his life. Three of his children died at some point during their childhood. As a result of this, Lincoln grew even more religious.