Cooperative spectrum sensing (CSS) is crucial for dynamic spectrum access in cognitive radio networks. This paper considers a CSS scheme by using a multilevel quantizer in each sensing node (SN) to quantize the local energy detector’s observation. A log-likelihood ratio test detector by using quantized data received from each SN is proposed to determine the presence or absence of the primary user signal. The Bhattacharyya distance (BD) of the cooperative sensing system is derived. Then, a quantizer design scheme by maximizing the BD that as the criterion function in an optimization problem with respect to the quantization thresholds is proposed. As nonlinear and high-dimensional of the objective function, a particle swarm optimization algorithm is employed to solve operating parameters for the quantizer. Furthermore, we derive the upper bound performance on cooperative energy detection (CED) in CSS. To validate the effectiveness of the proposed approach, The quantizer is compared with other schemes in terms of detection performance. Simulation results show that 2- or 3-bit quantization of the proposed approach achieves comparable performance to upper bound of CED without quantization.