This question must be understood as a question of usage. The primary source are the relevant books (the books). They are so old that all possible copyrights have expired by now, so the books are easily found online.
Therefore, we can inspect which gender the relevant books ascribe. You are asking on an English language site, so we'll inspect English translations of the books. Note that there are all kinds of problems with translations; the question which gender historical texts ascribe to their gods would be harder to answer and involve critical examinations of language, culture and the text histories. I'll give two examples for the difficulties involved, with the caveat that I'm not a theologician and have no knowledge of Hebrew.
- Hebrew apparently has no grammatical neuter. Every word is male or female. That means that in Hebrew, god cannot be "it" at all for purely grammatical reasons. Obviously that weakens the conclusions we can draw from god's original grammatical gender.
- One of the words for the god in the Torah is Elohim, a plural; if we can believe the wikipedia entry about the subject, in Genesis 1:26-27 "Elohim" creates man and woman "in his image" (their image?).
- The New York Times had an article by a Rabbi touching this very topic as part of a general examination of how gender appears in the Hebrew bible. It suggests that YHWH, one of the names for god in the bible, was actually read backwards as "Hu/Hi ", meaning "he/she". To me that sounds as close to "it" as you can get in a language which doesn't have "it".
But you are asking about English, so we'll examine English translations. In English there is a grammatical neuter, so referring to god -- a person-like entity -- with "He" makes a statement about the physical gender ascribed to, well, him.
Torah: We find an English translation here, and the first book, the Genesis, uses "He" in the few cases it doesn't say "God"; for example in the fifth sentence:
And God called the light day, and the darkness He called night.
(But remember the translation problems.)
Quran: An English translation is here, and in the 2nd Surah the translation uses "He", for example in 2:20:
And if Allah had willed, He could have taken away their hearing and their sight.
This should answer your question. Note that it is not immediately clear what the original authors of the texts wrote, and what they meant with what they wrote. For example, the Catholic virgin Mary cult may well be rooted in a misleading translation.
As a side note: Let's suppose that the original authors indeed wrote and meant that god is male. Then it is still up to debate whether what they wrote is correct (from the standpoint of a believer). After all, the authors were children of their (patriarchal) times and may have misunderstood, mis-interpreted or liberally embellished their visions. My girlfriend says "When god created man she was only practicing" (for example, she mutilated the chromosomes).
But as far as the actual English usage goes, it's clear that the correct pronoun is "He".