Renewable energy sources have been increasingly deployed as distributed generators in remote areas. Meanwhile, fluctuating power generation from renewable energy sources, together with variable power demand, poses challenges in stable and reliable power supply. In this paper, a microgrid with solar photovoltaic (PV) and battery energy storage (BES) is studied. A state of charge (SOC)-oriented charging scheme is developed to control the BES to smooth the PV output. Most importantly, a sophisticated control algorithm, consisting of a model predictive voltage control (MPVC) and a model predictive power control (MPPC), is proposed for the interlinking converter. It enables stable voltage in islanded mode. Also, in grid-connected mode, flexible reactive power can be injected into the main grid for grid support according to the voltage variation level. Finally, by considering the intermittent nature of the PV and the load profile, an energy management system (EMS) is designed to ensure power balance within the system. Case studies are provided to demonstrate the effectiveness of the proposed control strategy.