Here's how I see it: No, Xander probably shouldn't have screamed at Anya like that. He did leave her at the altar. He did hurt her.
However, say you dated someone for over two years, got engaged and came thisclose to getting married. You lived together, saved each other, went to Hell and back together. Something happens that leaves your relationship a little up in the air, but there is still love there. But then you catch your partner bonking not only someone else, but a soulless demon, and one that you despise at that.
I can see why he would be upset that Anya turned around and so easily slept with someone else. I also think that Anya and Spike were disgusted with themselves for it, because they were trying to find solace but instead hurt the people they cared about.