Urban green spaces improve quality of life by mitigating urban temperatures. However, there are challenges in obtaining urban data to analyze and understand their influence. With the aim of developing innovative methodologies for this type of research, Artificial Neural Networks (ANNs) were developed to predict daily and hourly temperatures in urban green spaces from sensors placed in situ for 41 days. The study areas were four urban allotment gardens (with dynamic and productive vegetation) and a forested urban park in the city of Valladolid, Spain. ANNs were built and evaluated from various combinations of inputs (X), hidden neurons (Y), and outputs (Z) under the practical rule of “making networks simple, to obtain better results”. Seven ANNs architectures were tested: 7-Y-5 (Y = 6, 7, …, 14), 6-Y-5 (Y = 6, 7, …, 14), 7-Y-1 (Y = 2, 3, …, 8), 6-Y-1 (Y = 2, 3, …, 8), 4-Y-1 (Y = 1, 2, …, 7), 3-Y-1 (Y = 1, 2, …, 7), and 2-Y-1 (Y = 2, 3, …, 8). The best-performing model was the 6-Y-1 ANN architecture with a Root Mean Square Error (RMSE) of 0.42 °C for the urban garden called Valle de Arán. The results demonstrated that from shorter data points obtained in situ, ANNs predictions achieve acceptable results and reflect the usefulness of the methodology. These predictions were more accurate in urban gardens than in urban parks, where the type of existing vegetation can be a decisive factor. This study can contribute to the development of a sustainable and smart city, and has the potential to be replicated in cities where the influence of urban green spaces on urban temperatures is studied with traditional methodologies.