Nonlinear autoregressive exogenous (NARX), autoregressive integrated moving average (ARIMA) and multi-layer perceptron (MLP) networks have been widely used to predict the appearance value of future points for time series data. However, in recent years, new approaches to predict time series data based on various networks of deep learning have been proposed. In this paper, we tried to predict how various environmental factors with time series information affect the yields of tomatoes by combining a traditional statistical time series model and a deep learning model. In the first half of the proposed model, we used an encoding attention-based long short-term memory (LSTM) network to identify environmental variables that affect the time series data for tomatoes yields. In the second half of the proposed model, we used the ARMA model as a statistical time series analysis model to improve the difference between the actual yields and the predicted yields given by the attention-based LSTM network at the first half of the proposed model. Next, we predicted the yields of tomatoes in the future based on the measured values of environmental variables given during the observed period using a model built by integrating the two models. Finally, the proposed model was applied to determine which environmental factors affect tomato production, and at the same time, an experiment was conducted to investigate how well the yields of tomatoes could be predicted. From the results of the experiments, it was found that the proposed method predicts the response value using exogenous variables more efficiently and better than the existing models. In addition, we found that the environmental factors that greatly affect the yields of tomatoes are internal temperature, internal humidity, and CO2 level.