if $\vec L=I\vec ω$ holds good in all the cases then directions of angular momentum and angular velocity must be parallel always which is not true in some of the situations. So under what conditions does the relation $\vec L=I\vec ω$ holds good ?
I am assuming that by $I$ you meant the moment of inertia relative to a given axis. Then you are right, the relation $\vec L=I\vec ω$ does not hold in general. So for example a particle in circular motion about the $z$-axis at the plane $z=z_0$ has angular momentum relative to the origem which does not point in the $z$ direction. Moreover, it precesses about the $z$-axis.
The general formula is $\vec L=\mathbb I\vec\omega$, where $\mathbb I$ is the so-called inertia tensor, a three by three, symmetric matrix whose six independent parameters give all the information about the rotational inertia of the body.
It can be shown that for any rigid body, there are at least three perpendicular axes of rotation - called principal axes of inertia - such that the angular momentum is parallel to the angular velocity. In fact those axes are the eigenvectors of the inertia tensor.
Let us get back to the example before mentioned. If we add an identical particle rotating in a diametrically opposite position relative to the first then the $xy$ component of the total angular momentum cancels the $\vec L$ and $\vec \omega$ are parallel. As we can see, if the mass distribution is symmetrical about the axis of rotation, then angular momentum and angular velocity are parallel and that axis is actually a principal axis of inertia.
Summarizing, the axis of rotation being one of the principal axis of inertia is a sufficient as well as a necessary condition for $\vec L$ and $\vec\omega$ be parallel. It is often possible to find the principal axes without needing to diagonalize the inertia tensor. The following rules can be proven:
- If the body has a plane of symmetry containing the reference point $O$ (from which the inertia tensor is calculated) then the axis perpendicular to that plane and going through $O$ is a principal axis.
- An axis of symmetry through $O$ is a principal axis. Any two mutually orthogonal axes contained in the plane perpendicular to the axis of symmetry are principal axis. Note that by "symmetry" we mean that the density of mass is symmetric under rotations.