Bacteria can organise themselves into communities in the forms of biofilms and swarms. Through chemical and physical interactions between cells, these communities exhibit emergent properties that individual cells alone do not have. While bacterial communities have been mainly studied in the context of biochemistry and molecular biology, recent years have seen rapid advancements in the biophysical understanding of emergent phenomena through physical interactions in biofilms and swarms. Moreover, new technologies to control bacterial emergent behaviours by physical means are emerging in synthetic biology. Such technologies are particularly promising for developing engineered living materials (ELM) and devices and controlling contamination and biofouling. In this minireview, we overview recent studies unveiling physical and mechanical cues that trigger and affect swarming and biofilm development. In particular, we focus on cell shape, motion and density as the key parameters for mechanical cell–cell interactions within a community. We then showcase recent studies that use physical stimuli for patterning bacterial communities, altering collective behaviours and preventing biofilm formation. Finally, we discuss the future potential extension of biophysical and bioengineering research on microbial communities through computational modelling and deeper investigation of mechano-electrophysiological coupling.