Quorum sensing in bacteria is the process of cell to cell communication that allows individuals in a population to monitor the local density of similar cells. The switch from individual cell to collective behaviour is governed by the production of chemical signals called quorum sensing molecules (QSMs). As the level of QSMs experienced by individual cells exceeds a threshold, transcription of certain genes will be activated. Many collective processes are regulated by quorum sensing, such as luminescence, biofilm formation, and the secretion of virulence factors. In this thesis we will study the role of quorum sensing in the biofilm context. Bacterial biofilms are communities of millions of individual cells encased within a self-produced polymeric matrix. Biofilms are ubiquitous and can be found on solid or liquid surfaces. We will investigate the switch between two generic sub-populations within the biofilm; up regulated cells and down regulated cells. Up regulated cells are assumed to produce quorum sensing at a higher rate than down regulated cells. First we investigate well-mixed populations and show that there is a sensitive switch that activates transition between these the two subpopulations. Then, we investigate spatial effects on quorum sensing within a mature colony and reveal that a travelling wave of upregulation can occur through an existing cell population. Then, we investigate the possibility to have pattern formation within subpopulations of cells induced by quorum sensing. We establish that under standard assumptions Turing instability cannot occur. However, introducing non-linear diffusion of cells can generate patterns. Lastly, we investigate the interplay between the processes of chemotaxis and quorum sensing and show this system could generate stable patterns within the up and down regulated sub-populations.