The phrase "in a vacuum" is included when referring to the speed of light to clarify that the constant speed applies specifically to light traveling through empty space, devoid of any material medium.
In different mediums, such as water, glass, or air, light can travel at different speeds. When light passes through a medium, it interacts with the atoms or molecules of that medium, which can slow down its propagation. The speed of light in a medium is generally slower than its speed in a vacuum.
So, while the speed of light is constant in a vacuum, it can vary when passing through different materials. To avoid any ambiguity, the phrase "in a vacuum" is used to specify that we are referring to the speed of light in the absence of any medium.