  This paper mainly deals with the Sturm-Liouville operator \begin{equation*}
\mathbf{H}=\frac{1}{w(x)}\left( -\frac{\mathrm{d}}{\mathrm{d}x}p(x)\frac{
\mathrm{d}}{\mathrm{d}x}+q(x)\right) ,\text{ }x\in \Gamma \end{equation*}
acting in $L_{w}^{2}\left( \Gamma \right) ,$ where $\Gamma $ is a metric graph.
We establish a relationship between the bottom of the spectrum and the positive
solutions of quantum graphs, which is a generalization of the classical
Allegretto-Piepenbrink theorem. Moreover, we prove the Persson-type theorem,
which characterizes the infimum of the essential spectrum.
