Anyone that tells you they can tell a "good horse" from a "bad horse" before the horse is basically done growing and developing is full of crock.
Personally, I look at bloodlines and performance records of related horses and parents/grandparents. It is really tough to breed two 5/10 horses and get a 10/10, you need to start with two good horses in order to make another.
I would still do all the normal tests and a vet check and all and just make sure the horse has straight legs that function properly. And definitely look at personality! If you don't get along with the horse when it's young, you aren't magically going to get along with it later. I've handled quite a few young horses (<2 years) and the ones with good temperament do have the ability to stand quietly, and behave. It's only the ones that really are trouble that behave like a handful.