I'd suggest you read this book -
It is simply great, teaches both basics and more advanced options when it comes to tricks. :) It has inspired me greatly.
I think that a horse is ready to learn a trick or to, when he has perfect ground manners, is respectful and understands the 7 games, which I find a good starting point in teaching most horses. However, I don't just follow them blindly, but use my own experience and ideas, which tell me what fits my horse best.
For example, I noticed that my horse enjoys mouthing different objects, so one day I let him mouth my crop, then gently suggested him to take it (just like a horse would take a bit) and added a vocal cue ( "Hold!" ) and the instant he took it and held it I praised him. Now he holds it easily and will follow me, still holding it in mouth, and gives it back on cue "Give".
Sitting comes after being able to lie down easily, to be able to lie down on side and on chest, to push out front legs by command, to be lied down again on the side whenever I ask with a soft touch, and to lie for extended amounts of time, not just a few seconds. When my horse was good at that, I asked him to extend his front legs and then rise slowly in a sitting position, still listening to me and not getting up completely. It took some time, but he has finally started doing it quite well.
However, you should be careful and start with simple tricks, and, if you don't have much experience, don't rush to lying down, sitting, pawing, rearing, and such. These tricks may be dangerous if the horse misplaces his body even unintentionally and hurts you, and they can also teach him bad habits, ir the skill level is not sufficient to keep the horse respectful and attentive.