The Code of Hamurabi and the Torah are as different as night and day, although on the surface there appear to be certain similarities. First of all I do agree with your dating of this Code, that it preceded the giving of the Torah at Mount Sinai by some 400 years (see the Gateways “Timeline of Jewish and World History” at http://asktherabbi.org/DisplayQuestion.asp?ID=199 ). Nevertheless, this time difference is irrelevant since most of its 282 laws are basic civil laws that any king or legislature could enact for the sake of running a “fair” society.
There are two major differences I will list briefly and then address the topic of an eye for an eye. One difference is that the laws of the Code that are religious in nature are based entirely on believing and practicing idolatry.
A second difference is that it does not deal with morality per se. It doesn’t say “don’t steal” or “don’t murder” or “don’t hate” or “love your neighbor”. Rather it is a code of consequences that if one does X then the punishment is Y. The Torah, on the other hand, is a handbook for a life of ethical monotheistic living. Therefore it contains directions of what is right and wrong.
Regarding your question of an eye for an eye the Code states: "If a man destroys the eye of another man, they shall destroy his eye.” This is to be meant literally. The Torah teaches – clearly and in great detail – that the consequence for damaging another’s eye is monetary compensation.
For further reference I suggest the book Biblical Personalities and Archaeology, by Leah Bronner, and Pritchard's book, The Ancient Near East.