Almost all of the distance on the puck comes from the wrist flick. There are a few key elements to good shooting technique. The puck should roll along the length of the blade during the shot such that it is near the end of the stick when you snap your wrist. This seems obvious, yet some experienced players who have trouble shooting do not do this. If the puck leaves the stick from near your knuckle you just end up using your shoulder to shoot the puck.
Some people find it helpful to concentrate on starting with their elbow high off the bottom.
The resulting motion causes the lower end of the forearm to turn upwards. It is useful to note that on really long shots the stick ends up pointing forward with the blade facing downward along the pool bottom. Distance will come if you can become effective at getting the puck off the pool bottom. The best way to practice shooting for height is to use a barrier. Usually this distance is about a meter or so.