The clause in question (which uses a linking verb) literally reads kai theos 'en 'o logos (literally "and God was the Word" but you won't find it translated that way for good reason). Notice that the word order is switched around with "God" at the front of the clause. Because the verb is a linking verb, the subject and object use the same case ending, the nominative. With a linking verb, the part of the clause that would be the object often drops the article (even though it would use it otherwise), especially when it is in front of the verb (as here). When the object of a clause is a noun like this, it is called the "predicate nominative" and Colwell's RuleColwell's Rule allows the translation to indicate the definiteness of the word even when the Greek lacks the article.