The efficiency of solar cells is usually determined by the characteristic curve of voltage-current relationship. The objective function for the solar cell design is often nonlinear and multimodal. Accordingly, a global search algorithm is desired to solve the objective function. This study applies a lately developed metaheuristic algorithm, named whale optimization algorithm (WOA) which has good global search capability, to solve the objective function for estimating the undetermined parameters of solar cells. Furthermore, this paper proposed a rank-based WOA with a nonlinear rank-based selection pressure model to replace the random selection process used in the original WOA at the stage of searching for prey. A tournament selection based WOA is also presented for comparison in this work. The performance of the rank-based WOA is assessed by testing six benchmark functions. From the experiments, the present rank-based WOA outperforms the original and tournament selection based WOAs in optimizing benchmark functions. Moreover, the proposed Rank-based WOA is applied to the parameter optimization of solar cell problem. The optimal solutions and parameters obtained using the rank-based WOA will be compared with those of using the original and tournament selection based WOAs.