Morphogenesis of multicellular organisms is driven by localized cell shape changes. How, and to what extent, changes in behavior in single cells or groups of cells influence neighboring cells and large-scale tissue remodeling remains an open question. Indeed, our understanding of multicellular dynamics is limited by the lack of methods allowing the modulation of cell behavior with high spatiotemporal precision. Here, we developed an optogenetic approach to achieve local modulation of cell contractility and used it to control morphogenetic movements during Drosophila embryogenesis. We show that local inhibition of apical constriction is sufficient to cause a global arrest of mesoderm invagination. By varying the spatial pattern of inhibition during invagination, we further demonstrate that coordinated contractile behavior responds to local tissue geometrical constraints. Together, these results show the efficacy of this optogenetic approach to dissect the interplay between cell-cell interaction, force transmission, and tissue geometry during complex morphogenetic processes.