I've never been able to decide who's side I'm on for the whole Xander/Anya arugment. Mostly because I don't believe it's something you can or should side on. Xander and Anya work it out in the end and it was a mistake, a justified mistake.
Not that this thread is about sides, I just thought I'd put that in as one of my prior thoughts.
Xander did make a mistake, and it was a big mistake. But really, he made two mistakes. The first was giving Anya the ring--proposing--in the first place. He knew he wasn't ready, he knew deep down inside of him but he didn't think about that for whatever reason. Xander did what he did best, jump into things he didn't really understand 100%. Often, Xander will jump into a fight. It's his courage, despite his fear. It's a good point yet it's also a bad point. He will jump in to fight the vampires without any superpowers or weapons of his own and is actually very brave but we all know how scared he is deep down. His proposing to Anya was just another one of those instances. He loved her, he still does by the end of the series and I believe that she is his one true love but he wasn't ready for that kind of committment.
I believe that one of Xander's biggest fears in life is becoming like his parents...or anybody in his family really. His family is dysfunctional and really, all he's been shown in his life is dysfunction. He's been brought up to see families that don't work for one reason or another. Willow's parents who treat their daughter as if she isn't there, Buffy's mother who is divorced and his own various caotic families. What has he really seen to prove to him that love through marriage goes well? It's his biggest fear, something he doesn't want to have to deal with in later life. He doesn't want to have a child thinking of him what he thinks of his family. And he wants to love someone forever, and for it to be the right someone.
So, yeah. Anya is the right someone but his proposing happened really early. Not early in the realationship exactly, athough two yaars isn't exactly 'long' by some standards. It was just too early for him to know what he really wanted. And what with all the things they do to help Buffy there was no chance of settling down and making things work. There was bound to be problems. But Xander jumped into it anyway, knowing he wanted her and ignoring his fear--like he often does.
What the demon did at the wedding was make him realize his fear. Or, not realize it exactly but face it. Again, wrong choice of words. The demon forced him to put the fear in the forefront of his mind. He had to acknowledge it for the first time. He was surrounded by his family, being shown these future flashes--although they werne't real--and he had to finally face the fact that he was afraid of the being him one day. He was afraid to end up like the people waiting for the wedding to start. And, he didn't want to hurt Anya but banishing her to a horrible life like that. He realized that they weren't ready and he had to let Anya down.
Of course it was a horrible bow for Anya but because she's Anya and she hadn't been a human for a long time and also had never seen too much of what Xander lived with nor had she walked in his shoes, she didn't understand the motives behind it very much and wasn't willing to accept a good explanation anyway.
But yeah, those are my comments.