Light propagation and localization in modulated photonic lattices and waveguides