I think one of the problems with Riley is that he gets outshone by Spike and Angel in every scene he shares with them, and given that the three of them are Buffy's main love interests throughout the series, naturally Riley always comes in last in fans' opinion. Given that being Buffy's "normal" boyfriend is his main role in the series, he's basically already at a disadvantage.
At the beginning of Season 4, he does genuinely seem like a nice guy, especially in the scene where Buffy knocks the books on his head, but making him the leader of an elite military force kind of pushes the suspension of disbelief to its limit if its given any real thought. In fact the whole initiative storyline suffers from this.
However, the real issue with Riley for me is his behaviour towards Buffy. Riley is actually a bit of a jerk towards her throughout Season 5, especially in Into the Woods, which retroactively makes some of his less than stellar season 4 behaviour such as The Yoko Factor more questionable. It's kind of telling that the moment the power dynamic changes between them (Riley's no longer in charge at the initiative, no longer the TA in Buffy's class, no longer has his super soldier abilities etc), basically the moment Riley is brought down to "normal", he can't handle it, and he becomes almost obsessed with Buffy "needing" him. Given how Riley was behaving towards Buffy, her missing the helicopter was the best thing that could've happened to her. Due to Riley's ultimatum that was essentially "Give me a reason to stay or it's your fault if I leave", if Buffy had stopped Riley leaving, she would be trapping herself in the Briley relationship because she would've prevented Riley from re-joining the military therefore she "owes" him to make the relationship work even though she's not happy in it. When taking Season 5 into account, it retroactively makes Season 4 look like the "honeymoon period" for the Briley relationship. Episodes like The Yoko Factor show Riley's nice guy mask starting to slip whilst Season 5 is his true colours starting to show.
This is why I have so much issue with Xander's speech in Into the Woods. Buffy has called Riley out on his behaviour, she's refused to give into his ultimatum , she's basically stood up for herself and gone "this is me, either deal with it or go but I am not being dragged into your issues", yet Xander practically tells her that she SHOULD put up with and tolerate Riley's unacceptable behaviour because he is "the one that comes along once in a life time" and Buffy listens and believes him. What was an empowering moment for Buffy (and arguably women everywhere who have been in a relationship where their partner is trying to make themselves indispensable) is essentially kicked aside for "you should totally be with this guy and change for him because he can't accept you for who you are". It's an awful message to send to the audience.
Had the writers actually "gone there" with the Briley relationship, and shown how easily it is to get sucked in without even realising it, then I think Riley could've been a really powerful character to have on the show because he had everyone fooled, including the audience, with his nice guy act. His less than stellar moments seemed OOC which is why he's so easily forgiven but that is actually the real Riley.
In some ways I view Briley as worse than Spuffy. Whilst Spuffy is awful and unhealthy for both participants, at least it is honest about it and Buffy KNOWS it's not a good thing even though she chooses to continue engaging in it. However, with Briley, Buffy kind of sleepwalks into it without realising and it's only because Spike showed Buffy what Riley was up to (because of his own selfish reasons) that Buffy called Riley out on his behaviour. Even then, Riley is trying to blame her for it, saying he wanted to "even the score" because Buffy "let" Dracula bite (despite her making it clear it was against her will), he then talks about how the vampire whores made him feel "needed", something which buffy doesn't do- again blaming her for his behaviour.
Season 6 Buffy would be Riley's perfect Buffy because she is an absolute wreck that season and that vulnerability would enable him to manoeuvre himself into a position where Buffy becomes dependant on him. Riley could've been the real villain of Season 6 and Tara could've been the ones to spot the signs that something wasn't right within the Briley relationship due to her background with her family. Buffy rising out of her state of despair would be paired with her kicking Riley to the kerb as he would've wanted to keep her in that depressed state because it benefitted him to do so.