In gilgamesh, which I think is the oldest story written, the snake steals the plant that turns back the effect of aging. So they've aways been crafty and bit malacious.
That's fully understandable if you look at the area and types of snake that inhabit it. Snakes and scorpions of that region can quite easily kill people. In general, creatures like these do not sit out in the open. They find quiet, dark places to 'hide out'. The old "snake slithering up the bed" scenario is a common example of this. Thus to the man with no knowledge, they would appear deceptive and cunning, when in fact- they're just looking for somewhere to hang out, which is suitable for
their needs. In honesty you'd need snakes and the like if making a story about deception etc... it's not like cows are suitable is it? But i suppose you regard a snake talking to adam and a snake stealing the secret pot of aloe vera as complete and undeniable facts?
Furthermore, they have nothing to do with demons, no more than ticks/leeches/mosquitos are all offspring of dracula.
At those times snakes were very common in writings/depictions simply because they were the most well recognised danger. Snakes, scorpions, and locusts all can cause extreme problems for a guy- and as such would be hated just like modern day farmers hate crows, modern day postmen hate dogs, etc.
Look at stories involving animals, look at the time that story was around and then work out why....
Look at the piper of hamlin, (and other well known stories involving mass slaughter of rats). Why do you think a guy would have driven rats into the sea, at that time and place, instead of snakes?
Many animals are hated- that doesn't mean they're to blame.