Angular momentum of a rigid body about a fixed axis is given by
$L = I ω$
where $I$ is moment of inertia and $ω$ is angular velocity about that axis.
Kinetic energy of body is given by
$K = \frac{1}{2}I\omega^{2}$
$ \therefore K =\frac{1}{2I} \left(I\omega\right)^{2} = \frac{L^{2}}{2I} $
$ \Rightarrow I =\frac{L^{2}}{2K} $