Harmful algal blooms (HABs) intoxicate and asphyxiate marine life, causing devastating environmental and socio-economic impacts costing at least $8bn/yr globally. Accumulation of phycotoxins from HAB phytoplankton in filter-feeding shellfish can poison human consumers, prompting site harvesting closures if concentrations in shellfish exceed safe levels. To better quantify both long- and short-term HAB risks, we developed novel data-driven approaches to predict phycotoxin concentrations in bivalve shellfish associated with HAB forming Dinophysis species. Our spatiotemporal statistical modelling framework assesses long-term HAB risks for different shellfish species in both data-rich and data-poor locations. This can revolutionise mariculture management by more confidently informing optimal siting of new shellfish operations and safe harvesting periods for businesses. Meanwhile, our machine learning framework forecasts phycotoxin concentrations further into the future than previously possible. Across 6 coastal, estuarine and loch sites, we achieve 87% overall accuracy in predicting future harvesting shutdowns 0-8 weeks ahead.