This research paper explores the prediction of solubility of Nystatin in SC-CO2 and corresponding density using regression models and Glowworm Swarm Optimization (GSO). The dataset consists of temperature, pressure, solvent density, and solubility of Nystatin drug, with three regression models applied: Multi-Layer Perceptron (MLP), K-Nearest Neighbors (KNN), and Kernel Ridge Regression (KRR). GSO is employed for hyper-parameter tuning of models. For solubility predictions, GSO-KNN demonstrates exceptional performance with an R2 score of 0.99201 and MSE of 4.1500E-04. GSO-MLP also excels with an R2 score of 0.99956 and an MSE of 2.4690E-05. Regarding density predictions, GSO-KRR achieves an R2 score of 0.93993, while GSO-KNN exhibits an R2 score of 0.98804 and GSO-MLP attains an R2 score of 0.98868. Although GSO-KRR lags behind, all models demonstrate substantial predictive accuracy. This study highlights the utility of regression models in predicting solubility and density in SC-CO2, showcasing the superiority of GSO-MLP and GSO-KNN for solubility and density predictions and the competence of all models for density predictions. The findings provide valuable insights for applications in pharmaceutical and materials science research.