Looking at the frets is not a bad thing, but when performing, you should limit this because you will get more contact with the audience when looking around. Then it will be more of a performance to the audience, and the audience will feel that you perform for them. Otherwise they would probably just as well listen to a recording.
Probably everyone looks more or less at the frets when practicing and learning new stuff, but when you are going to perform on stage, you should learn the material well enough so you don't have to look.
This is something that comes more naturally as your technique improves, and it is something that you don't need to learn specifically (as you would with a completely different style or something).
If your neck starts to hurt, it might be that you are too tense. Try to relax your shoulders when playing, and sit with your back straight. Your fretting hand will be at a sharper angle to the fret-board, but it will not strain your neck so much.
For classical guitarists, it is more common to look at the fretboard, even in concert.