At some point prior to the events of the episode Buffalord Soldier, Hiccup created the glasses in an attempt to minimize the harmful effects of looking into bright areas, especially dragon fire, as it would help him whilst he was working with Toothless on his inventions. He utilized the goggles to supervise Toothless as he had him use his plasma blasts at close range on a metal object. During this event, Fishlegs arrived and asked what the material in the lenses was. Hiccup explained that the lenses were made of Death Song amber and explained their use. Fishlegs asked to try them on and was allowed to do so by Hiccup.
Later on, while attempting to search for a Buffalord on Odin's Respite in order to save Astrid from the Scourge of Odin, the Riders came upon an area of the island that was exposed to extremely bright sunlight. Unable to see, Snotlout assumed that there was nothing in front of them. However, Hiccup was able to exploit the glasses to cut through the glare and see the nearby Buffalord, which was using the sunlight to hide in. After letting the rest of the Riders know that something was there, Hiccup gave the glasses to Snotlout, who was able to see the Buffalord for himself.
During the Riders' attempts to stabilize the erupting volcano on Dragon's Edge in order to make sure that the island is safe for the dragons living there, Hiccup and Fishlegs attempted to combine various substances with Gronckle Iron to counteract the erupting lava. Upon seeing Meatlug playing with the goggles, with them eventually falling over her eyes, Hiccup and Fishlegs got the idea of using Death Song amber in conjunction with Gronckle Iron to stabilize the island, leading to Hiccup and Astrid heading to Melody Island in an attempt to procure some amber from the Death Songs living there.
These glasses contain Death Song amber in the lenses, allowing the wearer to look into areas that are extremely bright, such as the glare of the sun or the flame of a dragon, without any ill effects or discomfort. The amber seems to be used in the same sort of function as dark glass, as the glasses resemble modern sunglasses.