The evaluation of energy input and output processes in agricultural systems is a crucial method for assessing sustainability levels within these systems. In this research, the investigation focused on the input and output energies and related indices in sunflower farms in Khoy County during the agricultural year 2017–2018. Data were collected from 140 sunflower producers through specialized questionnaires and face-to-face interviews. Additionally, artificial neural networks (ANNs), specifically the multilayer perceptron, were employed to predict the output energy. The results revealed that a substantial portion of the total input energy was attributed to chemical nitrogen fertilizer (43.98%), consumable fuel (25.74%), and machinery (8.42%). The energy efficiency (energy ratio) in these agroecosystems was relatively low, measured at 1.57 for seed and 7.96 for seed and straw. These values should be improved. The energy efficiency in seed production was computed at 0.06 MJ·ha−1, while, for the combined seeds and straw, it was 0.57 MJ·ha−1. In particular, seed energy efficiency represents approximately 11% of the overall biological energy efficiency, highlighting that a substantial 89% of the produced energy is associated with straw. The proper use of this straw is crucial, as its improper handling could lead to a drastic decrease in overall efficiency. Furthermore, the explanatory coefficient (R2) and the mean absolute percentage error (MAPE) to predict the output energy with the best neural network were 0.94, and 1.77 for the training data, 0.97 and 1.55 for the test data, and 0.9 and 2.08 for the validation data, respectively; additionally, 0.97 and 0.42 were obtained by an ANFIS.