$f\in L^2(0,1)$ if and only if $f\in L^1(0,1)$ and some condition. $f\in L^2(0,1)$ if and only if $f\in L^1(0,1)$ and ere exists an increasing function $g:[0,1]\rightarrow \mathbb{R}$ such that 
$$\left|\int_a^b f(x) dx \right|^2 \leq (g(b)-g(a))(b-a)\quad\quad (*)$$
for all $0\leq a \leq b \leq 1$.
For $(\Rightarrow)$, it follows from Jensen's inequality that 
$$\left|\int_a^b f(x) dx \right|^2 \leq (b-a) \int_a^b |f(x)|^2 dx$$
so just take $g(x) = \int_0^x |f(t)|^2 dt$.
For $(\Leftarrow)$, I am not so sure. First I know that $\frac{1}{2\sqrt{x}}\in L^1(0,1)$ but it is not in $L^2(0,1)$, and I tried to see where $(*)$ would fail
$$(\sqrt{b} - \sqrt{a})^2 \leq (g(b)- g(a)) (b-a)$$
$$(\sqrt{b} - \sqrt{a}) \leq (g(b)- g(a)) (\sqrt b + \sqrt a),$$
then how do I know that no such increasing function $g$ exists? 
I would really appreciate if you could provide me with some hints for the 2nd part, thanks!
Edit: I think I figured this out. Check my answer below. 
 A: (Partial answer)
For your question that there does not exists a function $g$ increasing on $[0,1]$ such that for all $0\leq a<b\leq 1$ we have 
$$g(b)-g(a)\geq \frac{\sqrt{b}-\sqrt{a}}{\sqrt{b}+\sqrt{a}}$$
you can argue as follows. First, changing $g$ to $g(x)-g(0)$ if necessary, we can suppose that $g(0)=0$. Then if $b>a=0$, we get $g(b)\geq 1$. Now choose $b>a>0$, we get $\displaystyle g(b)\geq 1+ \frac{\sqrt{b}-\sqrt{a}}{\sqrt{b}+\sqrt{a}}$, and if $a\to 0$, $a>0$, we get $\displaystyle g(b)\geq 2$ if $b>0$. An easy induction show that $g(b)\geq n$ for all $n$ and all $b>0$, so the function $g$ cannot exists.
A: Okay, so from $(*)$, we have
$$\bigg|\frac{1}{b-a} \int_0^1 f(x) dx \bigg|^2 \leq \frac{g(b)-g(a)}{b-a},$$
take the limit as $b \rightarrow a$, since Lebesgue points are a.e and monotone function $g$ is differentiable a.e, we have the following pointwise a.e inequality 
$$|f(a)|^2 \leq g'(a).$$
Now integrate both sides,
$$\int_0^1 |f(x)|^2 dx \leq \int_0^1 g'(x) dx \leq g(1)-g(0) <\infty.$$
