Who wrote it, man or God?
Humans wrote the Bible. And no, God did not dictate the words, either, but here is something to consider.
I was working in a church ministry once where it was decided that I would be the one to speak on a given topic. This upset me, I didn't want to do it, didn't even know where to begin. When I at least sat myself down in front of the computer to try, I was an emotional mess. I did the logical thing--entered into a prayer state and begged for help (hopefully to get myself out of writing and speaking).
Think of prayer as communication between the spirit of the individual and the spirit of God. The "communication" that came back was, "Write about _________ (an incident that occurred in my life). So I did. And so it went. "Write about ________ (another incident in my life). I didn't know what writing about these incidents had to do with anything--but it was calming me down, so I went on with the exercise, figuring when I was in a better state of mind, I would then be able to get down to the nitty-gritty of actual speech writing. Then came the "communication" of, "Now read it." While not yet in final form, there was my speech.
Absolutely it can be argued that the speech had been in my subconscious all along, I won't debate that at all, I'm simply relating what happened. That speech got a warm response from many. However one reaction stands out. One lady waited to speak to me privately. She was in tears, said she hadn't even wanted to come to the workshop, but "something" kept urging her to come anyway. While she had been seeing value in the workshop for others, she hadn't really been seeing anything new for her...until my talk. She said it was something she needed to hear, something she had been struggling with for a long time, and she credited God for that urge to attend the workshop.
That speech--the one I didn't want to give--went on to make a difference in her life, and in mine as well. I cannot credit myself for that work. Yes, obviously the words were within me, but it took God to bring them forth. (Or, for non-believers, my own subconscious.

) That is the way I look at the Bible. Written by man through mankind's experiences, but inspired and brought forth by God still with human imperfections and all.