In the most common hierarchical control structure for microgrids, the secondary control layer relies on communication technologies for receiving feedback data and sending control commands. The imperfections of communication such as the delays can cause oscillations during the voltage and frequency restoration which degrade the power quality. This work aims at studying this effect in the case of a typical AC microgrid in the islanded mode. For this purpose, stochastic delay models for industrial communication protocols are combined with a simulation model of the microgrid together with its control system up to the secondary level. The results illustrate how the choice of communication technology can affect the transient response. Additionally, compensation of the control performance for the effects of communication is considered. A simple method is used to improve the control performance only by retuning the controller coefficients, without altering the standard control structure. It is shown that appropriate retuning of the secondary controller can prevent from oscillations caused by the delays and improve the power quality to some extent. The presented framework can be used for designing and verifying the combination of communication and control subsystems in microgrids.