It's not ideal but it's infinitely better than nothing. Would I choose .22 for defense? No. But if that's all someone can handle due to recoil sensitivity or finances, it's better than being unarmed.
Even better in the .22 department is a .22 mag. That sucker in a decent barrel length can really boogie and pack a punch. Not like a .357 mag but it'll get the job done.