When the liquid is sprayed, it is broken into small drops. The surface area increases and hence the surface energy is also increased. Therefore, work has to be done to supply the additional energy. Since surface energy is numerically equal to the surface tension. So when soap is dissolved in water, the surface tension of the solution decreases and hence less energy is spent to spray it.