A mercury barometer is used to measure atmospheric pressure, which is the pressure exerted by the weight of the air in the atmosphere.