First off,
Doesn't matter that it taken out of context, it matters that it's practiced out of context. The phrase makes an appearance 2 more times in the Old Testament, Leviticus 24:20 and Deuteronomy 19:21 and once more in the New Testament
Yes there's more!
From the relevant sections in the sacred text archive:
http://www.sacred-texts.com/bib/kjv/lev024.htm
http://www.sacred-texts.com/bib/kjv/deu019.htm
Those say:
From Leviticus --
19 And if a man cause a blemish in his neighbour; as he hath done, so shall it be done to him;
20 Breach for breach, eye for eye, tooth for tooth: as he hath caused a blemish in a man, so shall it be done to him again.
21 And he that killeth a beast, he shall restore it: and he that killeth a man, he shall be put to death.
From Deuteronomy --
18 And the judges shall make diligent inquisition: and, behold, if the witness be a false witness, and hath testified falsely against his brother;
19 Then shall ye do unto him, as he had thought to have done unto his brother: so shalt thou put the evil away from among you.
20 And those which remain shall hear, and fear, and shall henceforth commit no more any such evil among you.
21 And thine eye shall not pity; but life shall go for life, eye for eye, tooth for tooth, hand for hand, foot for foot.
Anyways:
Under Judaism -- (This info is taken from wikipedia, as I know nothing about the study of Jewish Code of Laws)
Because the Torah forbids personal retribution (Leviticus 19:18) these passages are usually not be taken literally at all, they are figurative.
Scholars say that the phrase from Exodus (what raum quoted from) and Leviticus is meant in the context of tort cases (civil litigation) which would be what raum suggested. However, don't forget the part that says "he shall pay as the judges determine" that is while the husband may demand just compensation from what is at fault from the defendant a judge gives out what he believes to be fair. While Deuteronomy applies to false testimony against an accused (perjury), or in this case punishment for conspiracy. This is punishment based on intent, not action, again to be applied by a judge or court.
Under Christianity -- (I know a little bit more about this)
Well since Christianity is supposed to listen to the Jesus' own views of "eye for an eye" let's see what he says:
According to Matthew 5:38
38 Ye have heard that it hath been said, An eye for an eye, and a tooth for a tooth:
39 But I say unto you, That ye resist not evil: but whosoever shall smite thee on thy right cheek, turn to him the other also.
Just to give you the Rest of one of my favorite parts of the bible:
40 And if any man will sue thee at the law, and take away thy coat, let him have thy cloak also.
41 And whosoever shall compel thee to go a mile, go with him twain.
42 Give to him that asketh thee, and from him that would borrow of thee turn not thou away.
43 Ye have heard that it hath been said, Thou shalt love thy neighbour, and hate thine enemy.
44 But I say unto you, Love your enemies, bless them that curse you, do good to them that hate you, and pray for them which despitefully use you, and persecute you;
45 That ye may be the children of your Father which is in heaven: for he maketh his sun to rise on the evil and on the good, and sendeth rain on the just and on the unjust.
So in Christianity, Jesus does not believe in eye for an eye, in fact he says rather explicitly not to challenge violence with violence. Pretty much saying if you're on earth, you are treated equally by God until Judgment comes to past.
My personal Beliefs:
I personally don't believe in an eye for an eye. Then again Buddhists (like me, although not strict, I'm here aren't I?) believe in Karma, which in a basic sense says "Do good and good will happen to you, Do bad and bad will happen to you" from that in a macro-sense is somewhat eye for an eye. We just don't believe in vengeance by our own volition much like what Jesus says in Matthew.
And finally an outside opinion: (You all should have seen this quote coming)
Mahatma Gandhi: "An eye for an eye makes the whole world blind."