In the realm of agricultural advancement, the relentless quest for agricultural efficiency amidst the vagaries of climate change has positioned greenhouse technology as a linchpin for secure and sustainable food production. The precise management of greenhouse microclimatic conditions i.e., the ability to accurately predict and maintain ideal temperature and relative humidity, is crucial for enhancing plant growth and health, optimizing resource use, and ensuring sustainable agricultural practices. However, maintaining optimal microclimatic conditions is a significant challenge due to the dynamic nature of external environmental influences. This study aims to address the critical need for advanced predictive tools that can enhance the control and management of greenhouse microclimates, thereby supporting sustainable agricultural practices and food security. Our research introduces a novel integration of building transient simulation (TRNSYS) and artificial neural networks (ANNs) to predict temperature and relative humidity inside a greenhouse across the calendar year, based on external atmospheric conditions. The TRNSYS model meticulously simulates the greenhouse’s thermal load, incorporating real-world data to ensure a high level of accuracy in describing the facility’s dynamic behavior. Our ANN model, composed of three layers, underwent optimization to identify the ideal number of neurons, learning rates, and epochs, settling on a model configuration that minimized prediction errors. The evaluation metrics, including root mean square error (RMSE) and mean absolute error (MAE), demonstrated the model’s effectiveness, with an RMSE of 0.3166 °C for temperature and 5.9% for relative humidity, and MAE values of 0.1002° and 3.4%, respectively. These findings underscore the model’s potential as a powerful tool for greenhouse climate control, offering substantial benefits in terms of energy efficiency, resource optimization, and overall sustainability in agriculture. By leveraging detailed dynamic simulations and advanced neural network algorithms, this study contributes significantly to the field of precision agriculture, presenting a novel approach to managing greenhouse environments in the face of changing climatic conditions.