Wait are we gonna turn this into a I hate riley thread.... coool, im in. hahaha...ok... In all seriousness though, I think Riley was the perfect guy for Buffy, he just screwed it up. Buffy needed someone normal, and Riley was the closest that any human guy could ever be for her. She needed the normal mixed with the strength (human strength though) as well as no dark evil past or massive demons (literally) hanging on their back.
The trouble came in his ability to have strength in himself in the end. I get that a lot of this is blamed on Buffy (especially by Xander) but imo that isn't remotely true. Buffy was dealing with the sickness of her mother, in fact, that is the only time we really see her neglect Rileys feelings. It wasn't ever about actually neglecting Riley either, it was more her focus on her mother...If Riley truly "wanted to be there" for her as he stated, he should have made that exceptional effort to do so. Thats what you do when things are going crappy for your other half. He understood the situation but became needy of Buffys intimacy exactly at the point she was unable to give it.
I suppose thats a little thing, that they could have gotten over, but in the end he let it destroy himself. I mean goign to vampires to seek a bit of comfort. Obviously the parallel there is cheating (just listen to their breakup speech where they lay it on a little too thick). And then at the last hurdle, what does he do? He give Buffy an ultimatum with 5MINS TO GO!! Work it out, argument, a quick scuffle with some vamps and then the speech with Xander and she still couldn't make it on time to catch Riley. Since we know he was told the night before that he had the option to go with the Army, he had plenty of time to tell her.
He started as the perfect guy, and ended in a mess. I do like that he reformed himself when he eventually returned...at least I did until I read a post on here a couple months back detailing how that return in 'As you were' wasn't as it seemed. ie... Spike could never be the doctor.