It is generally accepted that Moses wrote the bulk of Deuteronomy. There are some small exceptions in this authorship, specifically the last chapter of the book that deals with Moses' death, which Moses could not have written.
The book of Deuteronomy is looked at as a "second law" of the Israelites, but the book itself is a restatement of the original law. The people who had heard the original law were no longer alive, therefore requiring a more modern statement of the law for the new generation. Deuteronomy is believed to have been written around 1406 B.C., just after the 40 years of wandering by the Israelites.