In this answer, I'm going to use the sign convention that torques and angular velocities are positive if their direction points to the right (left would be an equally valid alternative for this answer too) using the Right Hand Rule, i.e. seen as clockwise if looking from the left hand side. Any gears spinning in the opposite direction will have a negative angular velocity.
EQUILIBRIUM APPROACH
One approach to determining the torques on each gear would be to draw the free body diagram of an individual gear with all the forces (meshing gears, shaft reaction) and external torques (shaft torque) exerted onto that gear. Then, by neglecting inertial forces, use equilibrium to write an expression relating the unknown teeth forces and external torques. An example of this is done for the gear marked with a 1:

Note the directions of the forces are completely arbitrary, while the input torque respects the sign convention.
Applying equilibrium, and eliminating the shaft force (only interested in gear forces and external torques), we get:
$$F_{II} = T_{in}/r_1$$
where $r_1$ is the gear pitch radius (approximately) or the distance from the gear centre to the pressure line (accurate, but not needed if ultimately interested in external torques). Repeating this for all gears, it should then be possible to relate the external torques to each other, and determine the ratios of each relative to the input torque, the sign of which ratio indicating the direction of the torque.
For some gear bodies, there will only be forces acting on it. The following example of a gear train should highlight this:

Free Body Diagrams:

Note how the middle gear has no external torque acting on it.
VIRTUAL POWER APPROACH
The second approach can be simpler to use, especially if the angular velocities are already known. First of all, a single algebraic equation relating the angular velocities of gears with external torques should be obtained. For simple gear trains, this equation has only two angular velocities, and takes the form:
$$\omega_{out} = G \omega_{in}$$
where $G$ is the gear ratio to be determined. For most planetary systems, there can be three angular velocities. An example I will use is the speed rule for a simple planetary gearbox:

$$\omega_s = (1+R)\omega_c - R\omega_a$$
where subscripts 's','c' and 'a' refer to the sun, carrier and annulus gears. $R$ is the ratio of teeth of the annulus gear to that of the sun gear.
Now, we need a power balanced equation: power in = power out. This is where the sign convention comes in handy: since the conventional directions of torque and angular velocity are the same, multiplying the external torque acting on a gear with its angular velocity will give you the value of power in. Therefore, the power balance equation will be the sum of all the power-in products, equal to zero. i.e. In general:
$$\sum_i T_i \omega_i = 0$$
For my example, this is:
$$T_c \omega_c + T_s \omega_s + T_a \omega_a=0$$
For a simple gear train, it would now be very simple to substitute the angular velocity equation into the power balance equation, but not immediately so for angular velocity equations with more than two velocities. To solve such equations, you need to set one of the angular velocities to zero, as if holding that gear still, e.g.:
Set $\omega_a=0$:
Ang. Vel. Equation: $\omega_s = (1+R)\omega_c$
Power Balance: $T_c \omega_c + T_s \omega_s=0$
Substitute Ang. Vel. Equation into power balance:
$T_c/T_s = -(1+R)$
Repeat for setting another velocity to zero.
This seems like cheating by forcibly setting angular velocities to zero, but it is still valid as the equilibrium solution (i.e. The external torque values) never depended on the angular velocities to begin with.
Finally, whichever method was used, a quick check can be made to see if all the torques satisfy global equilibrium. Thanks to the sign convention, global equilibrium is achieved if:
$$\sum_i T_i = 0$$