The widespread implementation of smart meters (SM) and the deployment of the advanced metering infrastructure (AMI) provide large amounts of fine-grained data on prosumers. Machine learning (ML) algorithms are used in different techniques, e.g. non-intrusive load monitoring (NILM), to extract useful information from collected data. However, the use of ML algorithms to gain insight on prosumer behavior and characteristics raises not only numerous technical but also legal concerns. This paper maps electricity prosumer concerns towards the AMI and its ML based analytical tools in terms of data protection, privacy and cybersecurity and conducts a legal analysis of the identified prosumer concerns within the context of the EU regulatory frameworks. By mapping the concerns referred to in the technical literature, the main aim of the paper is to provide a legal perspective on those concerns. The output of this paper is a visual tool in form of a table, meant to guide prosumers, utility, technology and energy service providers. It shows the areas that need increased attention when dealing with specific prosumer concerns as identified in the technical literature.