All verb tenses can be valid, when used appropriately.
Past perfect describes a past tense which occurred before another past tense, and that's useful when telling a story that's already set in the past.
"Yesterday" is in the past. So it's not disqualified from using past perfect.
If the narrator is telling a story set mainly in the present tense, the simple past would be better.
If the narrator is telling a story, where (even briefly) they are setting the point of narration to be in the past, and need to mention things which had occurred even earlier, then past perfect makes sense.
The sentence you provided, in isolation, is not enough to verify which tense is preferable, but there's a good possibility it's ok.