Microorganisms live in dense and diverse communities, with interactions between cells guiding community development and phenotype. The ability to perturb specific intercellular interactions in space and time provides a powerful route to determining the critical interactions and design rules for microbial communities. Approaches using optogenetic tools to modulate these interactions offer promise, as light can be exquisitely controlled in space and time. We report new plasmids for rapid integration of an optogenetic system into Saccharomyces cerevisiae to engineer light-control of expression of a gene of interest. In a proof-of-principle study, we demonstrate the ability to control a model cooperative interaction, namely the expression of the enzyme invertase (SUC2) which allows S. cerevisiae to hydrolyze sucrose and utilize it as a carbon source. We demonstrate that the strength of this cooperative interaction can be tuned in space and time by modulating light intensity and through spatial control of illumination. Spatial control of light allows cooperators and cheaters to be spatially segregated, and we show that the interplay between cooperative and inhibitory interactions in space can lead to pattern formation. Our strategy can be applied to achieve spatiotemporal control of expression of a gene of interest in Saccharomyces cerevisiae to perturb both intercellular and interspecies interactions.