According to Julian Jaynes, author of The Origin of Consciousness in the Breakdown Of The Bicameral Mind, prehistoric cave art isn't like more recent forms of art. It is actually "eidetic imagery," i.e., a kind of persistent vision or hallucination based on past impressions. Jaynes believed that these cave paintings were created by people who still weren't conscious in the modern sense of the term.
If true, "[t]his suggests that the cave artists were functioning in a different way from us today, and that something happened between their time and our own. Was this 'something' the development of modern language?" Source: Julian Jaynes Revisited.
Jaynes believed that consciousness evolved with the development of language. Before they learned how to speak to each other, humans existed in a bicameral state in which they literally heard voices in their heads, the result of one hemisphere of the brain "talking" to the other. These voices were the voices of the gods.
"This cave art may not rely on consciousness or the modern mind at all, but rather result from spontaneous renderings of hallucinatory images." Source: "Consciousness, Hallucinations & The Bicameral Mind," Marcel Kuijsten, p. 108, "Reflections On The Dawn Of Consciousness: Julian Jayne's Bicameral Mind Theory Revisited," 2006, The Julian Jaynes Society.
Jayne's theory is difficult to explain in a short blog post. An excellent review with a summary and quotes can be found here. Jayne's "Origins of Consciousness in the Breakdown of the Bicameral Mind" is one of the most original and interesting books I've ever read, and the follow-up collections of essays from the Julian Jaynes Society are also highly recommended.
The video lecture below, "Hallucinations As The Voices Of The Gods," by Brian J. McVeigh, who studied under Jaynes, gives an interesting overview of the subject of hallucinations. (The audio is pretty bad, so you'll need to turn up the volume).