Every protagonist needs a good antagonist to push them to evolve as characters. The best villains can evolve alongside them and can even become better versions of themselves in the process.
The Arrowverse has provided its fans with some pretty good villains over the years but just because a character started out as one doesn't mean that they'll stay one forever. There are a rare group of characters that debuted as villains who have gone through redemption arcs and become heroes in the series, or at the very least try to make up for the damage they've caused.
Astra Logue
Astra Logue was the daughter of John Constantine's ex, Natalie, that was dragged to Hell by a demon where she was forced to grow up after a failed exorcism. Astra planned to become the new queen of Hell and get revenge on Constantine by sending the souls of criminals from history after him and the other Legends. She threatened to end Constantine's life but allowed him to live on the promise that he could bring her mom back using the Loom of Fate.
After the 3 rings of fate were gotten by the team, Astra traveled to Earth to make sure he held up his end of the deal. She eventually decided against bringing her mother back despite the opportunity presenting itself and became an official member of the Legends, helping them stop the Fates.
Deathstroke
Slade Wilson was the main antagonist during the second season of Arrow and is arguably the best in the show's history. He originally started out as an ally of Oliver after meeting him on Lian Yu where his plane crashed after being shot out of the sky but was later injected with a drug called Mirakuru which altered his mental state.
He later returned with the goal of dismantling Oliver's life, blaming him for the death of Shado, but was stopped by Team Arrow and placed in an underground prison on Lian Yu. Years later, after the Mirakuru exited his system and his head was clear, he helped Oliver in his fight against Prometheus in exchange for information on his son, Joe.
Gorilla Grodd
Gorilla Grodd was one of the many victims of the particle accelerator that gained powers as a result of the accident. While he was a major threat in The Flash's earlier seasons, leading multiple attacks with armies of Gorillas on Earth, he experienced a mental regression after the Crisis of Infinite Earths and realized he needed to make up for all the things he had done.
He even had to team up with Barry to take down a mental version of Solivar so that he could escape his mindscape. Although he could always turn on the team again, he seems to be on their good side at least for right now.
Killer Frost
After the events of Flashpoint, Caitlin was changed to be a meta-human with ice powers, with the Killer Frost personality fully emerging after she was injured and began dying from a seizure. She began working with Savitar who was later revealed to be an alternate version of Barry and when he was killed, she went to go work for Amulet Black before being asked to rejoin the team by Cisco.
While Caitlin initially tried to restrict Frost from coming out, she came to appreciate her and given her more control over the body that they share. She also made the decision to drop the "Killer" portion of her name and simply go by Frost.
Captain Cold
Leonard Snart started out as a villain on The Flash, often serving as the leader of the Rogues. His criminal career began as a low-level robber before becoming Central City's most wanted criminal and getting his hands-on the STAR Labs cold gun which gave him a serious advantage over a character like the Flash.
Despite his past, he was recruited by Rip Hunter to prevent Vandal Savage's rise to power and joined the Legends. He eventually sacrificed himself to destroy the device known as the Oculus which had been used to control and determine the actions of the Legends by the Council of the Time Masters, dying a hero.
Heatwave
Mick Rory was another member of the Flash's Rogues and an accomplice and friend of Leonard Snart. He was also recruited by Rip Hunter to join the Legends but was initially against the idea until Snart convinced him that it would be a great opportunity to steal priceless artifacts from throughout time.
He joined the team alongside Snart and remained a member of the team even after he died. While his personality has remained more or less the same with him being an outwardly stoic pyromaniac, his loyalties have expanded and it's been made clear that he cares about his teammates.
Hartley Rathaway
Hartley Rathaway is an ex-STAR Labs employee that became a villain using a pair of sonic gloves he created. After changing the timeline, he became an ally of Team Flash and helped them discover a way to stop the time wraiths.
However, that dynamic was changed once again after Crisis on Infinite Earths, when Barry learned that Hartley was now a metahuman and never reformed and continued to be a villain due to Barry causing his boyfriend to be injured during a battle. He was reformed again when he helped Barry take down Godspeed whose blood was the cure Roderick needed.
Nora Darhk
Damien Darhk's daughter, Nora first appeared as a little girl on Arrow but after her father was killed, she was placed into child services and caught the attention of the Legends when she became possessed by Mallus. She started to work alongside her father after he was brought back from the dead and they traveled through time in order to weaken Mallus' time prison.
After her father's sacrifice in an attempt to stop Mallus from taking over her body, Nora ended up on the run from the Time Bureau using the time stone that she had gotten from Ray Palmer but eventually turned herself in. She eventually joined the Legends, became a fairy Godmother, and married Ray Palmer.
Malcolm Merlyn
Malcolm Merlyn was the main antagonist of Arrow's first season acting as the Dark Archer and the mastermind behind the Undertaking which leveled a part of the city. After the first season, he became a sometimes-ally, sometimes-enemy of the team with him often changing allegiances to suit his own desires and only caring about his daughter, Thea.
He also became the leader of the League of Assassins and a member of the Legion of Doom before he got redemption when he, Thea, and Oliver attempted to find Prometheus on Lian Yu. While there, Thea found herself on a landmine, and Malcolm, realizing that the device couldn't be deactivated, replaced her on the explosive. While it didn't make up for all the evil things he did until that point, it was the closest thing fans could expect from a character like him.
Bronze Tiger
Ben Turner was a mercenary that worked with the Chinese Triad assassin, China White, and often clashed with the Hood before ending up in prison. Eventually, after revealing himself to be the Green Arrow, Oliver was put in Slabside alongside him and several other criminals he put away.
While their conflict continued while in prison, the two formed eventually an alliance and Turner became an ally to Oliver, even helping him defeat the Ninth Circle after finishing parole. Based on what has been shown of the future timeline, his son, Connor Hawke, is eventually adopted by John Diggle in the future and is raised alongside his children.