|MadSci Network: General Biology|
I answered a question very much like this one a while back -- take a look at the full text of my answer there at http://www.madsci.org/posts/archives/dec96/840904233.Zo.r.html.
To summarize the relevant parts of that answer: a slit pupil helps an animal resolve images in the direction perpendicular to the slit. The mechanics for that involve the accuracy of peripheral vision in calculating depth perception (it's important to have depth perception in areas that both eyes don't cover). The narrower the pupil, the more accurate the depth perception of indirect or peripheral vision, so by narrowing it extensively in one direction, you would increase your depth perception in that plane.
As I said in the other response, I don't know what function a horizontal slit pupil might serve (and the author of the article I consulted even says that vertical slit pupils should be more common, as the horizontal plane is the more important to most mammals). My best guess is that it might be inherited from ancestors who lived on mountainous surfaces where seeing in the vertical plane was critical to survival.
Try the links in the MadSci Library for more information on General Biology.