Estimation of the signal-to-noise ratio (SNR) has become an integral part of wireless communication systems, particularly in cognitive radio systems. The knowledge of the SNR at any time is essential because it has a significant influence on the performance of the system. Approximating this parameter can help better calculate the occupancy level of different channels of the radio spectrum which is an essential part in decision making process of cognitive radio systems. Recently, a novel SNR estimation approach based on the eigenvalues of the covariance matrix of the received samples was proposed in the literature. This method is highly dependent on a number of parameters including number of input samples, number of eigenvalues, and MarchenkoPastur distribution size. In the process of SNR estimation, these parameters are chosen based on some factors such as available hardware, channel condition, and the application for which SNR is estimated. In this paper, we analyze the effect of each of the mentioned parameters on the SNR estimation method and show that they need to be optimized. We propose the use of particle swarm optimization (PSO) algorithm in the eigenvalue-based SNR estimation technique to optimize these parameters. The results of the proposed method are compared with those of the original SNR estimation method. The results validate the improvement achieved by our technique compared to the original technique.