Can wearing a helmet save your life?
It doesn't protect you
Just found this Youtube video about GTA 5 Myths.
In this episode they test also exactly your question. And they see, it doesn't protect you.
It will protect you
As the video in xan's answer is shown, it will protect you.
When you search a bit for this question you'll get many videos where you can see it will protect you, other shows it won't protect you.
Just try it by your own.
Yes, the helmet does protect you. See the video here:
These guys originally "Busted" this myth, but it seems that results can be inconsistent depending on exactly how you test this. The conclusion is that it definitely reduces damage, even from gunshots.