I will report recent progress on a relation between certain spectral problems and topological string theory. By using mirror symmetry, the topological strings are described by algebraic curves, called mirror curves. The quantization of such curves naturally leads to quantum mechanical operators. I will show that the eigenvalue problem of these operators is exactly solved by quantization conditions, whose building blocks are the refined topological string amplitudes in the so-called Nekrasov-Shatashvili limit. Based on these results, we finally found exact quantization conditions for a wide class of relativistic integrable systems (called cluster integrable systems), including the relativistic Toda lattice, associated with toric Calabi-Yau threefolds.