The OED has this phrase meaning to "(to go) very quickly" from 1921:

1921 J. Dos Passos Three Soldiers (1922) ii. ii. 67 We went like a bat out of hell along a good state road.

However, I found some antedatings.

First, from August 17, 1895 in the Evening Star (Washington DC, Page 15, Image 15), in an article titled "COWBOYS AT WORK / Hamlin Harland Gives His Impression of a Round-Up. / THE CRUELTY OF BRANDING / Some Stirring Encounters Between Man and Beast. / WITH THE COW BOSS":

The branding was soon over and then the camp began to move. The next round up lay over a formidable ridge, and as I rode behind the troupe with the boss, I saw a characteristic scene. Toiling up the terrible grade, one horse on the cook's wagon gave out, and four of the cowboys hitched their lariats to the pole and jerked the wagon up the gulch "like a bat out o' hell," as one man graphically put it. In this way do these men dominate all conditions.

Placing the quotation on the map, the report itself is from "SALEDA, August 4, 1895" and begins "At Cripple Creek mining camp...". There's both a Salida (note spelling) and Cripple Creek in the state of Colorado, just 50 miles from each other as the bat flies.

Next, two antedatings via the American Dialect Society mailing list. From Stephen Goranson:

The Lions of the Lord: A Tale of the Old West By Harry Leon Wilson, Copyright 1903, published June, 1903, page 107 (google book full view): Why, I tell you, young man, if I knew any places where the pinches was at, you'd see me comin' the other way like a bat out of hell.

From Fred Shapiro:

1906 The Cosmopolitan May [article beginning on page 81] (American Periodical Series) A peon shot back the bolt of the bull-pen door and in poured the bull like a bat out of hell.

Finally, Dialect Notes (Volume III, Part V, 1909) is good as it gives a descriptive reason for the phrase: