There's a great book on this topic: it's called Artificial Paradises, and was edited/compiled by Mike Jay. It's compendium of primary source writings about drugs and altered states of being, starting with the snippets of references in poems from BC, moving to the birth of Christianity (one source posits that early Christians may have been a magic mushroom cult), and right up to Hunter S Thompson and other more modern stories.
I highly recommend it; it's fun reading, and it will make you look at humanity's drive to seek altered states in a different way.
EDIT: the answer to your question is "both". Additionally, drugs played a big role in religion and spirituality. Humans (and many animals) have an innate drive to alter their consciousness at times - that's why little kids spin in circles until they fall over. Altered states don't necessarily require drugs.