Modulational instabilities play a key role in a wide range of nonlinear optical phenomena, leading e.g. to the formation of spatial and temporal solitons, rogue waves and chaotic dynamics. Here we experimentally demonstrate the existence of a modulational instability in condensates of cavity polaritons, arising from the strong coupling of cavity photons with quantum well excitons. For this purpose we investigate the spatiotemporal coherence properties of polariton condensates in GaAs-based microcavities under continuous-wave pumping. The chaotic behavior of the instability results in a strongly reduced spatial and temporal coherence and a significantly inhomogeneous density. Additionally we show how the instability can be tamed by introducing a periodic potential so that condensation occurs into negative mass states, leading to largely improved coherence and homogeneity. These results pave the way to the exploration of long-range order in dissipative quantum fluids of light within a controlled platform.