I was wondering whether this inequality is true on a space of measure 1. I tried using concavity of $\sqrt{x}$ but it did not help in this case. By holders we know that $L^2$ norm of $f$ is larger than or equal to the $L^1$ norm.
Any hints would be appreciated.
No it is not true if $f$ is only $L^1$. Set the measure space $X=[0,1]$ with Lebesgue measure, and choose $f(x) = 1/\sqrt x$. Then the right hand side is finite while the left hand side is infinite.
As Brian Moehring points out in the comments, it doesn't matter if $f\in L^2$ as well (or $L^\infty$) by considering $f_n = \min(f,n)$ and taking $n$ large.