Legal compliance in epidemiology refers to adhering to laws, regulations, and guidelines that govern the collection, analysis, and dissemination of health data. This includes ensuring the protection of individual privacy, maintaining data security, and following ethical guidelines during research and public health interventions.