Yes, and I say this dependent on the nature of the sex offenders crime. If the sex crime was considered violent or caused the death of the victim then, yes, castration of the offender is effective. A serious consideration must be made, because all people that are considered sex offender have not done what you may think. You can be labeled a sex offender if you were arrested for public urination.
Sex offenders may say, and may even believe, that they offend because of their hormones, but they really commit their crimes to enjoy power. Lording it over their hapless victims is what they enjoy, and castration would not prevent them form doing this. I have a cat that is mean as a snake. He bites our other cat, and claws us. He's neutered!