I did this once as a grad student. I pointed out an error to the authors of a published study. They were nice, but some of the email exchanges were a little tense. Understandably, emotions get high in a situation like this. However, I would not recommend grad students do this as a general project, because they can be easily attacked by more senior researchers with better standing in their fields.