Sound Blanket Frame
Outdoor air conditioning units on roofs or outside rooms of houses or apartment complexes are often always running and generating a large amount of noise constantly. The best way to reduce the noise or soundproof these units is to build a simple wooden or metal frame around them and attach outdoor sound blankets to the frame. This will effectively stop most sound coming from the outdoor AC unit. Keep in mind these units need a little bit of ventilation so the frame should be built about 18 to 24 inches larger than the unit, to allow air flow but not allow noise to escape.
Window air conditioning units can become noisy if not properly secured in the window. One way to remedy this is to put a board down below the unit and attach the unit to it firmly with brackets so that nothing on the window unit itself can rattle or vibrate. If this doesn't fix the problem, try putting a barrier around the window unit along with a blanket or a sound blanket. This will effectively reduce the noise from spreading to the other rooms of the house or apartment.
Another good option to reduce noise for outdoor air conditioning units is to simply build a wall around the unit that reflects any sound that comes from them. Build this wall out of wood so that the sound is partly absorbed and partly sent away from your home, apartment or business. Build the wall at least a foot higher the the actual air conditioning unit itself so that the sound cannot easily escape. These walls can also be built out of bricks or cinder blocks but are easier and cheaper to build simply out of wood.