(covers information from several alternate timelines)
Goggles were protective eye wear.
Pilots in the 20th century wore goggles when flying. As part of their Battle of Britain holosuite program, Miles O'Brien and Julian Bashir wore goggles as a component of their authentic Royal Air Force uniforms. (DS9: "Homefront")
In 2259 of the alternate reality, Pavel Chekov, along with other members of the engineering staff, would wear goggles when working on or around the USS Enterprise's warp core. (Star Trek Into Darkness)