Most times and places sunglasses are comfort items. The exceptions are mountains, deserts, snow fields, and near or on water. Lacking purpose-made sunglasses it is possible to manufacture field expedients by rigging a blind fold and poking holes or cutting a slit. You can used cardboard, plastic, thin wood, various barks, or cloth to make sunglasses that are effective enough to prevent snow-blindness and debilitating eye strain.
A variation I've messed around with is using a large bandana. I lay it out flat and roll up two of the diagonal points, cut a couple of slits and then putting it on as a blindfold. Using small slits and messing with it a bit I got a workable vision protector. I also found I could be wearing prescription glasses and put the bandanna on over them. The result was corrected vision, protection from the sun, and the cloth could be adjusted to allow ventilation, and a handy sweatband, while keeping blown sand and dust out. I tried it on dunes in Florida where the sun was blindingly bright, and the wind was making the sand a major nuisance. Most of the regular sunglasses were allowing sand in as the wind shifted.
Try it out and tell me works out for you.
If you have glasses, safety or prescription, you can make effective sunglasses by blacking part of the lenses out with cardboard, electrical or duct tape, paint, even mud. Tape is easy to work because you can run a couple of horizontal bands leaving a millimeter or two between them.