If you’re worried about how rain or sunlight will affect your airconditioning unit, you may be worried about the wrong things. The outdoor unit of your airconditioner is designed and built to resist rain damage and continue operating as usual.
Most of the parts in the outdoor/condenser unit are aluminum, copper or metal and engineered to withstand even acute rainfall and keep on cooling and/or heating your home. The electrical connections and components are sealed to be impervious to the indirect moisture posed by rainfall.
So it’s just to keep your unit clean in order for it to work in the harshest of weather and environment.