Hamill and it's not even close.
Nicholson...just no. It's fine for the time and the movie, but it really didn't capture the Joker well at all in my opinion (well I think it did an ok job of translating the earlier Joker into a Tim Burton Batman world, but that's not great).
Ledger's was good but is, in my opinion, incredibly overrated. Yes it might be the best villain in a superhero movie and it was good bar none (but is hardly some pinnacle of either villains or the Joker even). I think it gets overblown because it seems like people were blown away that he could act at all or something so they exaggerate how well it actually was, and people are easily duped by looks. Frankly, I'm not sure why people were so wowed that a mega budget movie would have great visual effects. I also think it is a step further. People were blown away by Batman Begins being good, and then Ledger upstaging Bale's Batman (which in hindsight was nothing special really, especially in the 2nd and 3rd films). I think time will show that Ledger's Joker was good but is elevated because of circumstances. And no, I'm not a Heath Ledger hater either, I think he was exceptional in Brokeback Mountain so I already knew he could act, and I think he was far better in it than Dark Knight where the makeup transformed him more for most people.
But Hamill just owns that role. It is a shame that things didn't match up for him being younger as he even has a perfect smile for that character, that Cheshire Cat grin, and then that laugh. I think he could have been a great live action version under the right circumstances (I fully admit those circumstances lining up were not likely to occur).
My perfect Joker would have been a Tim Burton produced, Ridley Scott or David Lynch directed version of the Killing Joke with Hamill.