Effective energy management of microgrid is essential due to significant growth of renewable energy resources like photovoltaic (PV) systems. Reactive power compensation capability provided by grid-tie PV inverters when PV power is unavailable increases the efficiency of the PVs utilization in microgrids. In this paper, a robust model combining particle swarm optimization (PSO) algorithm and primal-dual interior point (PDIP) method is proposed for optimal energy management of the microgrid, considering VAR compensation mode of the PV inverters. Besides, both the uncertainty of insolation forecast and forced outages of system components (diesel generators and branches) are taken into account. A bi-objective method is employed to detect the worst-case probable 24-h scenario with the severest effects on the system security. Finally, the energy management problem of the microgrid is solved under the obtained worst-case scenario, minimizing the microgrid operation cost, as well as satisfying the physical constraints of the microgrid and insolation limitation of the PVs. Simulation studies have been carried out on a modified version of IEEE 33-bus standard distribution system operating as a microgrid with variable PV generation. The results demonstrate the effectiveness of the proposed robust model for the microgrid energy management.