Localized states in disordered systems as bound states in potential wells