Who is Lyon? You might be wondering... well here is a little info. As a young boy he was orphaned and found by Ur. She taught him ice magic and later the two found and took Gray in. Lyon was constantly trying to better then the two, challenging Deliora. Ur ended up using ice shell to save the two boys and losing her life in the process. Lyon and Gray went seperate way and he would spend many years trying to find ways to dethaw Deliora and kill him. He was consumed by his desire to surpass his teacher until Team Natsu defeated him on Galuna Island. Lyon and his teammates would eventually find and join Lamia scale.
The relationship between Juvia & Lyon is highly amusing but needed because in some ways its similiar Juvia's pursuit of Gray. Juvia and Lyon are very similar in their quest for love. For starters, I find it ironic that Sherry, Lyon's teammate, was in love with him for years and he never noticed...not once. Fast forward to the team returning from Tenrou Island and he falls in love with Juvia at first sight. Sound familiar? Juvia fell for Gray at first sight. While Gray was clueless in the beginning it's interesting to note that Juvia initially recognizes Lyon's intentions.
In Juvia's words: "Pandemonium!". Juvia may not realize this, but this "Pandemonium" is going to be a good thing for her. It forces her to think about other possibilities. While she does still stick with loving Gray, for a moment it makes her consider the fact that other fish in the sea love her. Consideration aside... Lyon's confession makes her nervous and panicked. He is very bold and serious in his statements and actions, much like Juvia is towards Gray. When Gray and Lyon start making bets on the magic games over Juvia, it also causes panic. Juvia decides Lyon is a love rival, instead of someone vying for her affection. She even tries to confront Gray about who he likes more and in an ironic twist of fate, Gray has to be the one to tell her she is clueless.
I think Lyon would have continued to pursue Juvia if it had not been for his battle against them. Much to Chelia's chagrin, Lyon refuses to hit Juvia, leaving it up to her alone. This is actually one of the few differences between Juvia and Lyon. At the start of the Grand Magic Games, Juvia and Gray are on different teams. She even tells Gray she wont hold back on him despite liking him. Fast forward to now and even though Lyon likes Juvia, he wont touch her.
It ends up being his downfall because Gray & Juvia frankly don't care. They have much more at stake with this battle, not just a romantic feud. Upon seeing their unison raid, Lyon is visibly upset and jealous. He wants to fight back now at this point but now Chelia has lost her will to fight. Even the girl who was accusing Juvia of liking Lyon is now in awe of the unison raid. As if she no longer has doubts about Juvia's intentions towards Lyon, the guy Chelia likes. I imagine its painful to hear your naysayer (Chelia) call their teamwork "romantic".
I think what really set it in stone however is the battle with the dragon hatchlings. While Lyon does call out Juvia's name, it is Gray not Lyon that shield her. Gray readily dies for her. Even tough time was reversed, they still have a brief glimpse of what happened. I think it's at this point he realizes Gray really does love Juvia. While his personality is the type to be proud, boastful and try to be better at Gray in everything, he decides to take a step back. He is mature enough to realize they do like eachother, and he really stands no chance of being with Juvia. At the banquet he tells Gray he will give up on her. I imagine if Gray ever hurt her though, Lyon would be the first on his doorstep, ready to bust some heads.
Sadly for Lyon, he acts as a good catalyst for Gray's and Juvia's relationship and not his own because he forced Gray to step up his game.