As a god, Odin wants what is best for his people, the humans. Because of this, he wanted to know about the future about the fate of humans against the evil giants. In knowing what the future holds, he need to sacrifice something in exchange for the future, and that something was his eye, in which he uses in taking care and watching the world of the humans. That eye was one of the most important thing in his life as a god.