The first uses of cannabis were probably much the same as today -- for medication and recreation. It has been found buried with cavemen, similar to the way in which flowers are sometimes found buried with cavemen. There is also the possibility that it was used as a food.
For a good history of the uses and development of marijuana since earliest times, see Marijuana, the First 12,000 Years at http://druglibrary.org/schaffer/hemp/history/first12000/abel.htm