There is a huge body of work on this question, but Aristotle gave one well known answer: "the poet's function is to describe, not the thing that has happened, but a kind of thing that might happen, i.e. what is possible as being probable or necessary. The distinction between historian and poet is not in the one writing prose and the other verse-you might put the work of Herodotus into verse, and it would still be a species of history; it consists really in this, that the one describes the thing that has been, and the other a kind of thing that might be. Hence poetry is something more philosophic and of graver import than history, since its statements are of the nature rather of universals, whereas those of history are singulars."
http://www.authorama.com/the-poetics-10.html
I'd recommend Hayden White's Metahistory for an argument that historical writing is structured on literary principles.