A class of second order difference (discrete) operators with a partial algebraization of the spectrum is introduced. The eigenfuncions of the algebraized part of the spectrum are polynoms (discrete polynoms). Such difference operators can be constructed by means of Uq(sl2) the quantum deformation of the sl2 algebra. The roots of the polynoms determine the spectrum and obey the Bethe ansatz equations. A particular case of difference equations for q-hypergeometric and Askey-Wilson polynoms is discussed. Applications to the problem of Bloch electrons in a magnetic field are outlined.