New scientific knowledge is needed more urgently than ever, to address global challenges such as climate change, sustainability, health and societal well-being. Could artificial intelligence (AI) accelerate the scientific process to meet global challenges in time? AI is already revolutionizing individual scientific disciplines, but we argue here that it could be more holistic and encompassing. We introduce the concept of \textit{virtual laboratories} as a new perspective on scientific knowledge generation and a means to incentivize new AI research and development. Despite the often perceived domain-specific research practices and inherent tacit knowledge, we argue that many elements of the research process generalize across scientific domains, and that it is possible to build a common software layer that serves different domains and provides AI assistance. We outline how virtual laboratories will make it easier for AI researchers to contribute to a broad range of scientific domains, and highlight the mutual benefits virtual laboratories offer to both AI and domain scientists.