For me, it depends. My favorite ride is actually a tie between the Pirates of the Caribbean and the Haunted Mansion. Those two attractions are dark rides and they are examples of what I believe WED/WDI did best. Engaging, immersive masterpieces that deal with dark subjects with a certain humor that balances out the more terrifying aspects of the content itself (i.e. themes of life and death). I personally believe the placement (at least with Disneyland itself) in New Orleans Square is fitting because those were two dark rides that handled those subjects in a similar manner (or manor, pun intended).
I also partial, though, to Mr. Toad's Wild Ride and Peter Pan's Flight as well as It's a Small World and Space Mountain. I love dark rides in general and it's not even exclusive to Disneyland or any other Disney park. For example, one of the greatest Imagineers of all time, Rolly Crump, designed a dark ride for Knott's Berry Farm in the mid-1970's and Knott's Berry Farm is bringing a new version of it for the 21st century. However, the point is that I LOVE dark rides so much, especially if they're built in the 1950's-80's.
In my humble opinion, Haunted Mansion is the best dark ride by far at Magic Kingdom. It takes pretty much everything from the California version (sans elevator stretching rooms and Hatbox Ghost) and improves it. The other 3 you've listed have some serious flaws that prevent them from being the best as well. Pirates is too short, and Peter Pan & Buzz are pretty outdated.
As for other Disney parks, SSE is my favorite at Epcot and the original Pirates at Disneyland is my favorite dark ride anywhere.
Tough choice... both are quality picks....but I'll go with PoTC. Between the two I rate the Pirate ship with exploding cannons, the village scenes, jail scene, and Pirate skeletons a bit higher in my eyes.
Tough choice for me between Pirates and Mansion, but if I only had to time to do one of them, I’d definitely pick Haunted Mansion. Even before the new auction scene was put in place, I just prefer Mansion as an overall ride. I’d actually say it’s my favorite “dark ride“ on property (though opinions may differ on whats considered a dark ride), although I haven’t done Rise or Railway yet, so maybe one of them will take its place. Of the classic MK dark rides though, no question it’s the best one.
Buzz is one of those that I’ll do if I have time, but if not it’s no big deal, and Peter Pan is one of if not the most overrated attraction on property IMO.
I think I might be a bit biased because I just love everything about Peter Pan so I chose Peter Pan's Flight. True, it really can't compare to the detail to the Haunted Mansion or the PotC, but for me it is more about the love of the Peter Pan story I am seeing and the coolness that I feel as I fly in the ship over London and The Mermaid Lagoon.
My favorite dark ride is at DL--PoTC; there's something about seeing the fireflies as you float by Blue Bayou--the atmosphere is awesome! The closest they come to that, and its far from it, is when your floating by the San Angel Inn Restaurante on the 3 Caballeros. But since we're at MK, I went with HM as it's just a great ride!!