the most usual reason for a cat to spray is scent-marking of territory. Other methods of marking are rubbing scent gland (situated on the cheeks) against furniture and walls, and scratching.
We have a cat which sprays and I know this is very annoying. Ours does it because he feels insecure - there are 5 cats in our household and he is at the bottom of the pecking order, so he acts like a rebellious teenager and sprays. Scolding only makes him more insecure, so he does it more. If I see him about to do it, I call him (kindly!) over to me and then he seems to forget about it.
If you have a multi-cat household, you are very likely to get spraying problems, even if the cats have been neutered. If you don't have a multi-cat household, he/she may be doing it because of household tensions, or maybe a stray cat comes in through your cat-flap sometimes.
There are some very good sprays that will counteract the foul smell. And there is a vapouriser that is supposed to discourage spraying (it never worked in our house though). Ask your vet about products; some of them are very good.