Make sure the power to the electrical outlet has been shut off at the circuit breaker. Once you've ensured that the power is off, remove the outlet.
Remove the existing rotted drywall and moldy insulation and determine the location of the gap.
Prepare a plywood board replacement. Measure and cut it to size. Paint the board with Hydro-stop waterproofing sealant and cover with a layer of cheesecloth. Cut the cheesecloth at 45-degree angles at the corners to allow overlap. Allow the board to dry completely.
In the meantime, use the same sealant to paint the troublesome area underneath the window. Apply liberally to ensure a waterproof seal.
To begin the repair on the outside of the window, first prep the area by cleaning the window sill and ensuring that the weep holes are free of debris.
On the outside of the window, apply a bead of caulk to the crack in the wall. Use your finger to run along the seam to ensure proper cohesion.
Before replacing the drywall, replace any damaged outlets. Put the new insulation in place. Remember to put the paper side facing the living area.
Mark off the studs in the window frame with tape. This will help with locating them later when putting the drywall in place. Nail the drywall in place and then apply the drywall mud to the seams. Apply a strip of drywall tape to the seam and cover with more mud. Allow to dry, sand down and repeat if necessary.