Inside the optics. For optical/near-IR astronomy (i.e. roughly in the wavelengths that your eyes can see), atmospheric opacity only comes into play if there are clouds. You always want to look at objects higher in the sky (meaning through less atmosphere), but that's more because they have less distortion.
Inside the telescope, you lose some light every time you have a reflective surface. A simple telescope might have three reflective surfaces at 0.9 reflectivity, and so no more 3/4 of the original light reaches the detector. A complex AO system typically has closer to ten mirrors, so no more than a third of the original light will reach the detector. And that's before you account for all the other losses, like scattered light and the parts of the distortion that deformable mirror in the AO system can't correct for. So at worst case, it might be only 10% of the original light making it to the detector.
AO systems are great, especially for bright targets, but it always makes me cringe when people claim they are "better than Hubble". Space telescopes exist for reason...