Mercury is used in barometers because of its high density. At 13.9 g/cm^2, mercury is the most dense substance to exist as a liquid at room temperature. By comparison, water has a density of 1.00 g/cm^2.
The Torricelli barometer, shown in the attached image, measures the barometric pressure by the distance that the atmosphere will push the mercury up an evacuated, closed-end tube. This distance is typically 760 mm or 29.9 inches at sea level.
So here's where the density becomes an important factor: The same atmospheric pressure will support a column of water in an evacuated tube at a height of about 10.4 meters. Using a very dense liquid allows the tube used for the barometer to be much shorter, which is an important matter of convenience when trying to fit it into a room.