My 4 year old likes things done the 'right' way (whatever that happens to be from his point of view!).
He doesn't like things done incorrectly and he will sometimes tells me if other kids are transgressing whatever rules he has in his head while in the playground etc.
Personally, I'd prefer not to get involved in conflict resolution between friends, but similarly, I don't want to encourage him never to tell me things since his head isn't yet able to filter what does and doesn't need to be shared with an adult.
Instead, I'm following How2Talk suggestions by making eye-contact, nodding and saying "un huh", "oh" and repeating back to him what he's saying to show I've heard him, but not offering advice beyond that. Sometimes he needs a sympathetic cuddle too.
Most often though, once he has relayed the information to me and feels listened to, he runs off again to carry on playing. No further action or response required.