Humans had complex cultures and created great works of literature preserved in oral traditions long before the advent of writing. Writing systems, however, seem necessary for large and complex civilizations.
The first major use of writing was communication over long distances. Whether for purposes of trade or administration, any civilization that spans or deals with distances beyond a single day's travel (which would have been 20-30 miles before modern technology) needs some ability to communicate complex and accurate information beyond the range of the human voice.
Next, complex civilizations need administrative archives to handle matters such as taxation, business contracts, property registration, and inheritance. These require communication that persists over time, a quality unique to writing.
Finally, although oral tradition can preserve and transmit narrative, it is less effective at transmitting complex technical information.