As a life-long nail biter (mostly reformed since about 16), I find that I'm most likely to be tempted when I'm tense or nervous, bored, or haven't had enough physical exercise.
Like Cathy S., I found that my mom nagging or scolding only made it harder for me to stop biting, because it made me feel more anxious and tense. What works best for me is to be sure I've had enough activity during the day, keeping my nails filed smooth (I often touch up the edges twice a day), and having some alternative thing to do with my fingers – I tend to fiddle with my hair, or stroke some pleasant object or fabric between my fingers.
I tried everything as a child to break my own habit, including buying the nasty-flavored nail condiment out of my own allowance. Like a smoker, I had to try again and again to break the habit. I was always ashamed of my nails. I finally managed to stop the constant nibbling by the end of high school, but will always be a little compulsive in this way. For me, it is one expression of some Sensory Integration issues I've had my whole life.
When you notice your son nibbling, try giving him something better to do, and see if his nails need smoothing. Nagging probably won't do much good, and could make it worse. But if you can chat with him about the reasons he does it and whether HE would like to stop, he might appreciate reminders from you.