To combat the worsening global energy shortage, global photovoltaic (PV) installation capacity has been increasing rapidly every year. Since the instability and intermittence of PV power output have great impacts on utility grids, accurate PV power output prediction is crucial. This paper proposes the use of machine learning approaches, combined with a weather type classification method, to predict short-term PV power output. The datasets are collected from a commercial PV power station located in Yangjiang, Guangdong province of China (latitude 21.56 °N, longitude 112.09 °E). Firstly, daytime meteorological data from 07:30 to 18:00 are divided into six 2-h intervals, and then the meteorological conditions of each interval are divided into four categories using an Extremely randomized Trees Classification model according to the PV power generation in each period. Secondly, nine machine learning models are established based on the weather type classification to predict the PV power output. The results show that weather type classification is vital to the selection of appropriate machine learning models and the accurate prediction of PV power output because the characteristic correlation between the meteorological data and PV power output always changes. In general, the Lasso Regressor, Random Forest Regressor, Gradient Boosting Regressor, and Support Vector Regressor models show better performances than the other models. Furthermore, all the models’ accuracy is relatively high when the local meteorological conditions are relatively stable, such as in October, November, and December, during which time the Mean Relative Error values are 2.07, 1.07, and 1.73, respectively. During the period when the weather is unstable, the performance of the SVR model is better than that of the other models. The prediction accuracy can be significantly improved with integrating the accurate weather classification into the model. With regards to each daytime period, the prediction accuracy in the morning and evening is relatively high and the MREs for these times are small. This study provides a theoretical basis for selecting appropriate machine learning models to predict photovoltaic power generation under different weather conditions.