If you want my opinion, I’ll pick Pain. No, not Nagato, but Pain.
You must be registered for see images
And before explaining why I pick him, I’ll go by the other options.
Madara was good fun, but no more than that. Insanely overpowered, true, but he was treated like a caricature. He was a warmonger that preached about peace, and the series focused so much on the first aspect that when it chose to present the second, I just couldn't take it seriously. Finally, the way he was finally defeated was disastrous and very poorly executed.
Kaguya had no personality. We must've gotten like ten sentences from her total throughout her at in the manga. While she is the goddess of chakra, she takes orders from the black goo up her sleeve. She ended up looking more like a half-assed last minute addition rather than a premeditated plot twist.
Orochimaru was truly scary back in Part 1, but oh boy has time done him no good. At least as a villain. He was dispatched really half-heartedly by Sasuke only to return and have the same thing done to him by Itachi. By the end of the manga he was actually working with the good guys for some really half-assed reasons regarding Sasuke.
Kabuto, though no doubt an interesting character, was never a very interesting villain for me. He seemed too much like a retread of Orochimaru to be put in a pedestal above all others.
Lastly, Danzo, while a good bad guy, felt very underutilised in the series. Out of all these I listed, he’a probably my favourite….
Except we have Pain.
Pain was a real threat. He was the leader of the Akatsuki, he’d been built up since the beginning of Part 1, and his reveal ended with him killing one of the strongest characters in the series up to this point in the form of Jiraiya. He was threatening, looked cool as all hell and played an awesome foil to Naruto as his seniors disciple to Jiraiya.
Pain managed to make a bigger impact in the story than any other antagonist before him. He took down Kakashi, a fan favourite, and destroyed the entirety of Konoha. He gave us arguably the best fight in the manga with Naruto and pushed him to his limits, only to be overpowered in a legit and believable way with Naruto overcoming the Deva Path’s powers and landing one final Rasengan. Pain, for his time in the spotlight, was the best villain in this manga with perhaps the exception of Obito. It's a shame his legacy was devalued by the whole Rinne Tensei deal as well as Nagato’s later resurrection.
[video=youtube;pI7Jc-fSQQ8]https://www.youtube.com/watch?v=pI7Jc-fSQQ8[/video]