Its hard to determine exactly what makes a rival good. The best dynamic I found, was having a group of friends from gen 5, Bianca and Cheren. However, it was the dynamic that made the "rival" aspect so influential. But the single greatest rival has to be Silver.
The dynamic of having friends who grow and change with you and have goals that are different but linked to yours who matter is so impactful. It draws you in and makes you have a purpose in the game aside from being randomly in one town out of any of the towns, instead you have real friends who care about you, and gives you a presence in the world. Bianca and Cheren grow and change, but they have minimal character development if any. Instead, their role is to give you, the player, an impact and connection to the world.
However, Silver, has actual flaws, emotions, and goes through an actual change. He seeks out only power, and wants to be strong, and likewise does that with his training with his pokemon. But that is his true flaw, he doesn't care about his pokemon, only power, and thats what keeps him from growing, but as you progress in the game, he takes each defeat to heart, and eventually grows as a person. He, near the end of his growth, has a crobat, a pokemon that can only evolve through friendship, clearly showing the once uncaring asshole silver, who only cared about power and strength, instead shows compassion and understanding to his pokemon. He gives the player a character to fight against and be better than, but has his own troubles and goes through his own changes.
There's more to being a rival than just being someone to measure your power and team against. Going the route of having friends you grew up with is a good way to give the player a purpose and grounded nature in the story, but having a character like silver who changes through the story ultimately has a better impact.
What makes a rival bad though? Ultimately, its a character who does not change in the story at all. People rip on X/Y but characters like Tierno and Trevor were really cool, unique, and interesting! They had goals and desires that were not like yours as a player. Teirno wanted to dance, and that was great, he's a good boy who love dancing. But what ultimately failed him was the writers not giving him anything, he had no screen time, no chance for development, and with the game juggling 20 main characters, it was impossible for any of them to have any depth. He was not a bad character in his own right, he was just not utilized at all. It was sad to see the game fail the characters so tremendously, but its important to note that the characters themselves were not bad from a design aspect, it was the game not utilizing them at all that was the problem. Furthermore, Teirno not having a team of pokemon that incorporated dance moves, or own tempo and combos like that was a god damn shame and fuck the guy who decided that.