Artificial gauge fields enable the intriguing possibility to manipulate the propagation of light as if it were under the influence of a magnetic field even though photons possess no intrinsic electric charge. Typically, such fields are engineered via periodic modulations of photonic lattices such that the effective coupling coefficients after one period become complex-valued. In this work, we investigate the possibility of introducing randomness into artificial gauge fields by applying local random phase shifts in the modulation of lattices of optical waveguides. We first study the elemental unit consisting of two coupled single-mode waveguides and determine the effective complex-valued coupling coefficient after one period of modulation as a function of the phase shift, modulation amplitude, and modulation frequency. Thereby we identify the regime where varying the modulation phase yields sufficiently large changes of the effective coupling coefficient to induce Anderson localization. Using these results,
we demonstrate numerically the onset of Anderson localization in1Dand2Dlattices of x- and helically modulated waveguides via randomly choosing the modulation phases of individual waveguides. Besides further fundamental investigations of wave propagation in the presence of random gauge fields, our findings enable the engineering of coupling coefficients without changing the footprint of the overall lattice. As a proof of concept, we demonstrate how to engineer out-of-phase modulated lattices that exhibit dynamic localization and defect-free surface states. Therefore,we anticipate that the modulation phase will play an important role in the judicious design of functional waveguide lattices.