Injurious pecking (IP) represents a serious concern for the welfare of laying hens (Gallus gallus domesticus). The risk of IP among hens with intact beaks in cage-free housing prompts a need for solutions based on an understanding of underlying mechanisms. In this review, we explore how behavioural programming via prenatal and early postnatal environmental conditions could influence the development of IP in laying hens. The possible roles of early life adversity and mismatch between early life programming and subsequent environmental conditions are considered. We review the role of maternal stress, egg conditions, incubation settings (temperature, light, sound, odour) and chick brooding conditions on behavioural programming that could be linked to IP. Brain and behavioural development can be programmed by prenatal and postnatal environmental conditions, which if suboptimal could lead to a tendency to develop IP later in life, as we illustrate with a Jenga tower that could fall over if not built solidly. If so, steps taken to optimise the environmental conditions of previous generations and incubation conditions, reduce stress around hatching, and guide the early learning of chicks will aid in prevention of IP in commercial laying hen flocks.