From all accounts, nobody ever caught God in the act of writing the Bible. The Scripture simply says it was God-breathed and that holy men wrote it as God's Spirit led them. Those are just claims. What is the supporting evidence? The evidence can be found both internally (within the Bible itself) and externally (things outside the Bible that point to its authenticity). And, there are plenty of reasons to believe the Bible is from God.
But before looking at that, one must consider the concept of inspiration itself. Many people assume that all Christians share the exact view of how the Bible was generated. That is just not the case. Although some seem to infer that the Bible was dropped from heaven intact, the truth is that the most conservative view really is that the Scriptures were divinely dictated–that the writers wrote the exact words, word for word, that God placed in their minds. Therefore, these vigorously defend the Bible's infallibility and inerrancy. Conversely, the most liberal view is that God just sort of touched the writers and they wrote as their hearts moved them–much as any poet or songwriter is "inspired." Since the Scriptures generally do not tell us exactly how God inspired them, except in the cases when God or Jesus were actually said to be quoted, we have to try to reason out what inspiration is.
Since each writer wrote in his own language and vocabulary and used mostly situations peculiar to him, it probably should be assumed that God was not actually directly dictating it. If it were dictated then it should come out at least in a consistent vocabulary as from only one person. So, what probably happened was God put the exact idea, principle, or message in the mind of the writer and they expressed in their own particular way. They were generally allowed to use their own lives and experiences to make their points. This gives the Bible the human touch God apparently wanted it to have'–a human expression of a spiritual being. Rather than take away from its authenticity it gives it more. And, it explains some of the human touches for open-minded questioners.
Now, how do we know it was from God? There are a number of reasons to suggest it. First of all, in the things written that weren't known at the time. There are many examples of this. We know from a lot of other writings what the ancients believed at the time. We even see their misconceptions in their religious writings. However, the Bible demonstrates its divine origin in that its writers knew things men just couldn't have known at that time. In numerous examples from science and astronomy, medicine, history, human psychology and even geography, the Bible shows itself to have a divine inspirer behind it–someone who knew the ageless truths of the universe. How did Moses know which animals were "clean" and "unclean?" He did though. How did the writer of Genesis know a woman had an egg within her? Men didn't but one ancient writer did. How did Moses know to isolate disease victims and that the ancient Egyptian methods of medicine wouldn't work? He did. Germ-theory didn't crystallize until a century ago. How did Job know the earth was spherical in shape? How did he know that the world is not suspended by anything? From early times men, and even religious writers, believed all kinds of things about the earth, for instance, that it was flat. One Greek explanation was that the earth was surrounded by a great river flowing around it from which the sun rose on one side and set on the other only to be floated back around to rise the next day. Still others believed that the earth was on the back of a turtle or an elephant or Atlas himself. Yet, from the earliest times, the Bible would have none of such ignorance. The Bible even mentions that there are rivers in the ocean and springs in the deeps of the seas. Men could not really know such at the times. Even the creation account is consistent with our best understanding of how the universe developed into what it is today. Truly the debate has never been between science and faith, but between scientists and religious people.
Two other important observations are the Bible's brevity and harmony. Who would believe that a collection of human beings could write the basic history of God dealing with man in such a short volume? Men have written countless volumes about the Bible and still can't improve on it. Yet, such important events as creation, the great flood, as well as the life and death of Christ are each summarized in just a few pages. Also, that many men, far removed from each other by hundreds of years and many miles, could write their accounts of the times, both past, present and future, and harmonize their teachings so well testifies to the Bible's divine origin. This feat is impossible from a human point of view. From this perspective, one can only assume that at least parts of the Bible were inspired by a divine creator that had superior knowledge from the beginning.