Exploring the dynamics of biomolecules using single-molecule spectroscopy