To those saying soldiers are useless and slow... Learn to rocket jump and you'll find you're the 3rd fastest class, with the best ability to climb and get in interesting places. Also, if you learn to shoot the ground and round corners you can beat most classes before they get near you or able to see you.
Those saying scout is useless... well, if you're good at double jumping and strafing then you should have no problem getting in close, the main thing to do is use the terrain to your advantage. If you get in the right position you can actually circle strafe a sentry and kill it without taking any damage (obviously helps if theres no engi to get in the way!
As for snipers and spys, well, they can be the most useless or more usefull classes. Snipers can take out medics, heavies and engis very quickly, making everyoneelses job very easy. Its the same for spys, but they have the added bonus of being able to destroy sentries too (although harder for spys to get in position).
For those that moan about Pyros, yes they do require a bit less skill on smaller maps, but with the invention of the airblast and there other new toys, and extra layer of skill has appeared. You can now rocket jump with airblasted rockets, flare someone in the air, then as you land chop em with your axetingwisher for instant gib. - But that is the top end, at the bottom end, we get those that run at scouts flames a going, never quite gonna reach them...
There is no worst class, there is no best class, there are only different play styles. I've seen Heavies duel snipers and win (and it was a good sniper, but the heavy was just very apt at ducking) I've also seen medics that could take on half an enemy team (bluttsuckers are great, lol). Some classes prefer flat open areas, others prefer close corners and others still prefer high peaks to jump around.
TF2 classes are purely down to how you play and how the enemy play.