So, you saw your friend's girlfriend flirt with another guy; sounds scandalous. But first--what did you see and could you perhaps have misinterpreted? What if she was someone you didn't know? Could she have just been talking to this mystery man innocently? How close were they? Was the situation loud enough to have made close contact necessary in order to hear?
Let's say you're right, she did flirt with another guy, who was not your friend; have you ever been in a relationship and flirted, even just a little? I'm not saying -everyone- in a relationship flirts but I think most people do, just a little when the situation permits. It can be harmless and sometimes it's hard not to indulge when someone else strokes our ego by complimenting us on some little characteristic or another.
But perhaps their conversation was definitely heading more down the, "your place or mine" route. This puts you in a rough spot because obviously you care for your friend and you feel like he has the right to know if his girlfriend is perhaps accepting advances from other men...again.
I wonder why, perhaps, he thought that things might go differently the second time around, as I am guessing that there was definitely a talk the first time around after the first cheating incident(?). I'm sure he had his own reasons; he loved her, they came to some sort of understanding, he thought he couldn't do better, blah, blah. I would say the best advice he possibly could've gotten and probably did get was to ditch that girl to the curb. I don't necessarily believe that "once a cheater, always a cheater" is correct, but I would guess that "once a cheater, always a cheater--at least in the same relationship" is likely almost always spot-on.
But back to what -you- should do. If you tell him, it will likely bring him much insecurity in his relationship, if that doesn't already exist. Again, I will emphasize the importance of what you saw; is there any possible way it could've been innocent? Because if it was, it is likely that even telling your friend that you saw his girlfriend flirting with another man will put him on guard (perhaps unnecessarily) even if the girl is able to convince him she truly did not. And the girl (most likely) will want to know who told her boyfriend about her mishap in the first place, which could lead her to bad mouth you.
And ultimately, even if you do tell your friend, it is unlikely that this piece of information will be what breaks them up, true or not true; it is also likely that telling your friend this will leave him insecure and unhappy.
I would say that I would only tell your friend -if- you're willing to take on the weight of what could happen if what you saw was not actually reality, but just your perception of it, and be okay with knowing that either way, your friend and his gf will likely fight. Knowing what I only know, that you saw her flirt from your own perspective, I would say save that information for a different time when perhaps, your friend is digging up for more information on his girlfriend and lets you know personally that he thinks she might be cheating again--if that conversation comes up, then, I think, would be the perfect time to tell your friend what you saw.