Assume there are 2 balls on the table. Cue ball and another ball. What is the angle at which the cue ball should hit another ball for it to go in?
To the extent that it is an elastic collision (and it is, to a good approximation), at the moment of impact, the cue ball, the other ball, and the target pocket should form a straight line. So you should aim the cue ball such that when it touches the other ball the centers of the balls line up with the cup.
The reason for this is that when frictionless spheres contact each other the only force they can exert on each other is directly away from each other. Since the target ball is at rest, whichever the direction of force is pointing is the way it will go.