The answer to your question is explored in depth in Bernard Knox's introduction to Robert Fagles's translation. According to Professor Knox, the earliest examples of Greek writing go back to around 725-675 BCE, and that is believed to be the time of that The Iliad was committed to writing. The Odyssey is believed to have been composed sometime later.
The most reliable theory, according to Knox, is that the poem was composed orally, and over an extended period of time committed to writing.
As to the argument that Homer simply strung together a collection of ancient tales, Professor Knox debunks that theory. The structure of the poem is too sophistocated, particularly in terms of chronology, to have been a compilation.
So to answer your question briefly, you could safely say, as Gbeatty suggests below, the seventh or eighth century BCE. It was originally performed entirely from memory, and that the written text probably evolved over considerable period of time.