The objective was to identify the predictive markers and develop a diagnostic model with predictive markers for Parkinson’s disease (PD) and investigate the roles of immune cells in the disease pathology. Microarray datasets of PD and control samples were obtained from the Gene Expression Omnibus (GEO) database. We then performed a comprehensive analysis of differentially expressed genes (DEGs), functional enrichment, and protein-protein interactions to pinpoint a set of promising candidate genes. To establish a diagnosis model for PD, we utilized machine learning algorithms and evaluated the corresponding diagnostic performance using the receiver operating characteristic (ROC) curve and the area under the ROC curve (AUC). Additionally, the differential abundance of immune cell subsets between PD and control samples was evaluated using the single-sample Gene Set Enrichment Analysis (ssGSEA) method. A total of 264 DEGs were identified in GSE72267. The PPI network ultimately identified 30 hub genes for model construction. Seven genes, namely CD79B, CD40, CCR9, ADRA2A, SIGLEC1, FLT3LG, and THBD, were identified as diagnostic markers for PD, with an AUC of 0.870. This seven-gene signature model was subsequently validated in an independent cohort (GSE22491), demonstrating an AUC of 0.825. Ultimately, the infiltration of 28 immune cells showed that activated B cells, natural killer T cells, and regulatory T cells may contribute to the occurrence and progression of PD. We also found complex associations between these genes and immune cells. CD79B, CD40, CCR9, ADRA2A, SIGLEC1, FLT3LG, and THBD were identified as diagnostic markers for PD, and the infiltration of immune cells may contribute to the pathogenesis of the disease.