This was the year the Dwarves fled neighbouring Khazad-dûm. When, centuries later, Gimli came to the city, Celeborn said to him 'It is long indeed since we saw one of Durin's folk in Caras Galadhon.' (The Fellowship of the Ring II 7, The Mirror of Galadriel). While the implications of Celeborn's remark aren't completely clear, it's most likely a reference to the fall of Khazad-dûm and the escape of the Dwarves, 1,038 years earlier.
Beyond this, Tolkien makes no definite reference to the creation of Caras Galadhon. One workable theory is that it was built to guard Lórien from the threat of Dol Guldur across the Great River. If this is correct, the tree-city would have appeared in about the year III 1050, the time when Dol Guldur was built. It should be emphasised that there is no specific evidence for this dating, but it does seem to fit well within the historical context.