Anderson localization in synthetic photonic lattices