When a liquid thermometer is held in direct sunlight, it measures a higher temperature than that of the surrounding air, so it is inaccurate. This is because the sunlight adds extra energy to the liquid in the thermometer and causes it to expand more than it should.
Without the sun shining on it, the liquid thermometer is in thermal equilibrium with the air around it. This happens because as the air warms up, the thermometer absorbs some of the heat from the air, and the liquid expands. For accurate temperature readings, liquid thermometers must be placed in the shade and away from any other heat sources, such as a furnace.