Tradition makes Valmiki both author and character: a reformed bandit who becomes a sage, who shelters the exiled Sita, and whose grief at seeing a hunter shoot one of a mating pair of cranes breaks out of him as metrical speech, the origin, in the text's own account, of the shloka, the couplet in which most Sanskrit narrative was afterwards composed. He then hears Rama's story from the sage Narada and teaches it to Rama's own sons, who recite it back to him.
The scholarly account is of a bardic composition worked over for centuries. The core books are generally placed between roughly the fifth and fourth centuries BCE, with the text reaching something like its present shape in the early centuries CE. It was transmitted orally by reciters before it was written, and unlike the Vedas it had no permutation recitation to freeze it, which is why the recensions diverge as freely as they do.
What it did to Sanskrit literature is not disputed. The formal ornament, the elaborate descriptions of seasons and cities, the long similes and the sustained emotional register, particularly grief, which the text treats as its founding sentiment, became the model for kavya, courtly Sanskrit poetry, for the next fifteen hundred years. Kalidasa's Raghuvamsha retells Rama's dynasty within that inheritance.
Its political afterlife is equally live. Rama's reign, Ram Rajya, became the standard Indian image of just government, invoked by Gandhi to mean a moral polity and invoked since by Hindu nationalist movements to mean something considerably more specific, in a dispute over Rama's birthplace at Ayodhya that has occupied Indian courts and politics for decades.