This dissertation investigates the interface between technology and society in the emerging electricity systems and in particular the role of the energy prosumer in the energy transition. It contributes to the understanding of the role of consumers in emerging electricity systems within the current EU energy policy context where consumer active participation is regarded as "a prerequisite for managing the energy transition successfully and in a cost-effective way". Emerging energy systems are characterized by a high level of complexity, especially for what concerns the behaviour of social actors. Social actors interact through physical and social networks by sharing information and learning from one another through social interactions. These interactions determine self-organization and emergent behaviours in energy consumption patterns and practices. I argue that the best suited tool to study emergent behaviours in energy consumption patterns and practices, and to investigate how consumers' preferences and choices lead to macro behaviours is agent based modelling. To build a sound characterization of the energy prosumer, I review the current social psychology and behavioural theories on sustainable consumption and collect evidence from EU energy prosumers surveys, studies and demand side management pilot projects. I employ these findings to inform the development of an agent based model of the electricity prosumer, Subjective Individual Model of Prosumer - SIMP, and its extended version, SIMP-N, that includes the modelling of the social network. I apply SIMP and SIMP-N models to study the emergence in consumer systems and how values and beliefs at consumer level (as defined by social psychology and behavioural theories and informed by empirical evidence) and social dynamics lead to macro behaviours. More specifically, I explore the diffusion of smart grid technologies enabled services among a population of interacting prosumers and evaluate the impact of such diffusion on individual and societal performance indicators under different policy scenarios and contextual factors. The analysis of the simulation results provides interesting insights on how different psychological characteristics, social dynamics and technological elements can strongly influence consumers' choices and overall system performance. I conclude proposing a framework for an integrated approach to modelling emerging energy systems and markets that extend the SIMP model to also include markets, distribution system operator and the electricity network