Technically the Samsung Galaxy has the best hardware in all areas. So objectively that is the best one.
But subjectively one can prefer any of these devices over the others, for example the iPhone which is the most expensive of them all and at the same time has the shittiest hardware, some people will still prefer that, usually these people don't have the first idea about neither hardware nor software, but it's their subjective choice.
Cases can be made for all three which has the best software (Android is the most secure platform out of the three, it's also free, so you don't pay premium for it like the other two, and it's sponsored by Google which is a more cool company (as in less despicable) than Micro$oft and Apple, Meanwhile the Windows Phone has Windows so it has backwards compatibility with programs that can be run on other Windows platforms, this means you can run the same programs as your desktop PC (but what good will this do on a ******* touchscreen anyways?) and then finally we have the iOS, it beats the other two in performance, but loses in all other areas pretty much)
So in order of technical specifications
Samsung Galaxy > Windows Phone > iPhone
And ordering by price also
Samsung Galaxy > Windows Phone > iPhone
(Naturally this is because the Galaxy doesn't have you pay for the OS unlike the other two, so you get better hardware for less money)
But in the end, it's a matter of preference. Some people just prefer the iOS since even if the iPhone has shamefully bad hardware, iOS makes up for the sluggishness by somehow still managing to be snappy. Some people just like the familiar Windows interface and prefer the Windows Phone. And others just can't get enough of Android because no matter what they say, Android is the coolest kid in the school and everyone knows it :P