The condition for a local enhancement using mean and variance is that the local variance should be significantly different from the global variance. This allows the enhancement to target areas with unique texture or contrast, improving visibility of details in regions that deviate from the overall image characteristics.