Thermal energy is an important input of furniture components production. A thermal energy production system includes complex, non-linear, and changing combustion processes. The main focus of this article is the maximization of thermal energy production considering the inbuilt complexity of the thermal energy production system in a factory producing furniture components. To achieve this target, a data-driven prediction and optimization model to analyze and improve the performance of a thermal energy production system is implemented. The prediction models are constructed with daily data by using supervised machine learning algorithms. Importance analysis is also applied to select a subset of variables for the prediction models. The modeling accuracy of prediction algorithms is measured with statistical indicators. The most accurate prediction result was obtained using an artificial neural network model for thermal energy production. The integrated prediction and optimization model is designed with artificial neural network and particle swarm optimization models. Both controllable and uncontrollable variables were used as the inputs of the maximization model of thermal energy production. Thermal energy production is increased by 4.24% with respect to the optimal values of controllable variables determined by the integrated optimization model.