If it were "the book" then the Hungarian sentence would also use the definite article - and it would use the definite conjugation of the verb: Ki írja a könyvet?
The accusative case can be applied to an object whether it has a definite article ("the book") or an indefinite article ("a book") or no article at all.
That is an emphatic sentence -- you might use it in a context such as, "In summer, this author writes no books and that author writes no books; who does write a book?"
But in a neutral question, we don't use "do" when asking after the subject of a verb with "who". Just write "Who writes a book?"