A fundamental advancement in the evolution of complexity is division of labour. This implies a partition of tasks among cells, either spatially through cellular differentiation, or temporally via a circadian rhythm. Cyanobacteria often employ either spatial differentiation or a circadian rhythm in order to separate the chemically incompatible processes of nitrogen fixation and photosynthesis. We present a theoretical framework to assess the advantages in terms of biomass production and population size for three species types: terminally differentiated (heterocystous), circadian, and an idealized species in which nitrogen and carbon fixation occur without biochemical constraints. On the basis of real solar irradiance data at different latitudes, we simulate population dynamics in isolation and in competition for light over a period of 40 years. Our results show that in isolation and regardless of latitude, the biomass of heterocystous cyanobacteria that optimally invest resources is comparable to that of the idealized unconstrained species. Hence, spatial division of labour overcomes biochemical constraints and enhances biomass production. In the circadian case, the strict temporal task separation modelled here hinders high biomass production in comparison with the heterocystous species. However, circadian species are found to be successful in competition for light whenever their resource investment prevents a waste of fixed nitrogen more effectively than do heterocystous species. In addition, we show the existence of a trade-off between population size and biomass accumulation, whereby each species can optimally invest resources to be proficient in biomass production or population growth, but not necessarily both. Finally, the model produces chaotic dynamics for population size, which is relevant to the study of cyanobacterial blooms