However, assuming you have his consent, shaving is not only safe it's an incredibly erotic and intimate act between lovers, and one that millions privately share. The greatest risk is that you may nick or irritate the skin. I recommend a safety razor and a good quality shaving cream with moisturizer. You may also want to stock a small tube of cortisone cream in case the shaved area develops a rash afterwards (common, but avoidable).
Shaving can be introduced in many different ways but perhaps the most popular is to do it while taking a bath or shower together. Soaking in soapy water will soften the skin, and it's a natural to go from shaving your legs (if you do) to sensuously beginning to work on his balls. In fact, you could have him shave some part of your body first and then take your turn shaving him. Another and somewhat more effective technique (in terms of ensuring that you get it as smooth as you want) is to have him lying on his back, ankles spread. Make sure to have a bowl of warm water at hand (to rinse the blade). You could add even more spice to this by putting your man in handcuffs or a blindfold. Actuallly, some men would need to be restrained at the thought of having their balls shaved.
The most important technique in an erotic shaving is taking your time with it. Make each step of it erotic. Don't hurry. Slowly work the shaving cream--and your lover--into a lather. Don't hesitate to give him enjoyable sensations to keep him interested, letting your fingers run over shaved spots, giving him kisses and nibbles and essentially rewarding him for letting you have your wicked way with him, you vixen!