The single-phase grid-connected voltage source inverters with LCL filters are widely implemented in the grid using traditional Proportional Integral (PI) controllers. The Proportional Resonant (PR) controller introduces new features such as tracking of the sinusoidal waveform with zero steady-state error and better disturbance rejection capability in comparison with the PI controller. The mentioned benefits lead to a better power factor and system stability. This paper proposes a comprehensive design methodology of the PR controller in an inverter with an LCL filter. Also, a comparison of the PR and PI controller is presented. In this analysis, the optimal values of the PR controller are found based on the phase margin of the entire control loop of the converter. The simulation of the 1.5 kVA VSC with an LCL filter with a PR controller in MATLAB/Simulink® and real-time simulator validates the design and shows the stability margin of the proposed methodology.