As long as you're looking in her eyes and not at her boobs or anything, eye contact is very attractive.
Don't you like it when a girl stares into your eyes?
They feel the same way, only don't look at them when it's unnecessary, for example when she's doing something that doesn't have to do with communication with you. In general situations, if you look at a girl when you're not talking to her and she's not talking, you probably want to present a humorous comment or else she'll just think you're checking her out, which is flattering but not very attractive.
One very valuable E.C. tip: don't break eye contact and look off into the distance or away, or down, no matter what!
This shows lots of confidence and if you do otherwise, women will notice when you look away and either think you're nervous, shy or you're uncomfortable/uninterested in them.
But by all means, if you see something that catches your eye and you look away, that's perfectly normal. Especially so if you look away to check out another woman, then turn back to the girl you're talking to with a ****y smile. haha