Plants change their shapes, depending on their environment, for example, plant height increases with increasing population density. We examined the density-dependent plasticity in shoot morphology of herbs by analysing a mathematical model which identifies a number of key factors that influence shoot morphology, namely (i) solar radiation captured by leaves; (ii) shading from neighbouring plants; and (iii) utilisation efficiency of resource by leaves, stems and veins. An optimisation theory was used to obtain optimal shoot morphology in relation to maximal light capture by leaves, under trade-offs of resource partition among organs. We first evaluated the solar radiation flux per unit leaf area per day for different shoot forms. Our model predicts that the optimal internodal length of the stem that brings about the maximal light capture by leaves increases with plant population density, and this is consistent with experimental data. Moreover, our simple model can also be extended to explain the morphological plasticity in other herbs (i.e. stemless plants) that are different from our model plants with a stem. These findings illustrate how optimisation theory can be used for the analysis of plasticity in shoot morphology of plants in response to environmental changes, as well as the analysis of diversity in morphology.