Like most of the books of the OT canon, Numbers is, technically speaking, anonymous. The ancients, unlike we moderns, did not feel the need to identify “authors” for their compositions. In fact, it may be debated whether or not our concept of author was even shared in literary circles of the Bronze and Iron ages.
Traditionally the book of Numbers, as is the case for most of the Pentateuch, is assigned to Moses. And, indeed, there is at least one explicit reference to his writing activities in Numbers (see 33:2). There is greater use of the phrase “and the Lord spoke to Moses” in Numbers than in any other Torah book. It occurs at the head of most of the chapters and frequently in the body of the chapter. To be sure, this in itself does not prove Mosaic authorship, but it does make clear that the author(s)/editor(s) intended the audience to read and interpret the bulk of Numbers as a product of revelation revealed by God to Moses for/about Israel. And who is better qualified to write about that revelation than its recipient?
There are many scholars who understand the references to Moses in the Pentateuch to be theological and ideological rather than historical. For them, Numbers was written in phases over several centuries. The earliest part would be several poetic sections of Numbers (10:35; 21:14-15, 17-18, 27-30; 23:7-10, 18-24; 24:3-9, 15-24). Second would be stories composed around the time of David/Solomon to Elijah, attributed to the Yahwist (J) and the Elohist (E). This would include the likes of 10:29-12:16 and 20:14-25:5. Then several centuries later, around Ezekiel and Ezra's time (i.e., late exilic and postexilic) some priestly writers took this small core of ancient poetry and early narrative and substantially added to that their own elaborate fabric of codes, rituals, and narratives. Of course, the conservative is uncomfortable with this proposal in that such a position radically minimizes, if not eliminates, the historical value of the book's contents.