The production of materials with micrometre- and submicrometre-scale patterns is of importance in a range of applications, such as photonic materials, high-density magnetic data storage devices, microchip reactors and biosensors. One method of preparing such structures is through the assembly of colloidal particles. Micropatterned colloidal assemblies have been produced with lithographically patterned electrodes or micromoulds. Here we describe a different method that combines the well-known photochemical sensitivity of semiconductors with electric-field-induced assembly to create ordered arrays of micrometre-sized colloidal particles with tunable patterns. We show that light affects the assembly processes, and demonstrate how to produce patterns using electrophoretic deposition in the presence of an ultraviolet (UV) illumination motif. The distribution of current across an indium tin oxide (ITO) electrode can be altered by varying the illumination intensity: during the deposition process, this causes colloidal particles to be swept from darkened areas into lighted regions. Illumination also assists in immobilizing the particles on the electrode surface. Although the details of these processes are not well understood, the patterning effects of the UV light are discussed in terms of alterations in the current density that affects particle assembly on an ITO electrode.