The activity of the sunspot influences the space environment directly. In order to guarantee the flight safety of the spacecraft in the space, it is necessary to predict the sunspot number effectively. To solve this problem, a time series prediction model based on the process neural network with time-varying threshold functions is proposed. To simplify the calculation, a learning algorithm based on the expansion of the orthogonal basis functions is developed. The functional approximation capability of the proposed prediction model is analyzed, and the effectiveness of the prediction model and its learning algorithm is validated by the prediction of the Mackey-Glass time series. Finally, the proposed time series prediction model is utilized to predict the smoothed monthly mean sunspot numbers in solar cycle 23, and the results are satisfying. The application results also indicate that in comparison to other traditional prediction methods, the prediction method used in this paper has a higher prediction accuracy, thus it has theoretical meaning and practical value for the space environment prediction.