Answer
$\frac{1}{2}MgLsin\theta$
Work Step by Step
We know that gravity acts at the center of a uniform rod, so we know that gravity acts at $L/2$ away from the pivot of the rod. We know that the force of gravity is equal to $Mg$. Thus, we use the equation for torque to find:
$\tau =rFsin\theta$
$\tau = (L/2)(Mg)sin\theta$
$\tau=\frac{1}{2}MgLsin\theta$