The Poskim discuss wearing various forms of eyeglasses in the public domain on Shabbat without an Eruv.
The consensus of the Poskim is to permit wearing contact lenses. Since they are attached directly to the eye, there is no concern that one will take them out or that they would fall out and be carried. The only exception is when a person has just begun to wear them and is still getting used to them, he should refrain from wearing them.
Regular eyeglasses necessary for vision are permitted. Since they are required for normal functioning there is no concern that one will take them off and carry them. Although the Hayeh Adam (Rav Avraham Danzig of Vilna, 1748-1820) prohibited wearing glasses, the Poskim explain that he was referring to the type of glasses that were attached only to the nose and were more likely to fall off and be carried. This, of course, would not apply to our eyeglasses, which are attached with earpieces. This is the consensus of all the Poskim including Hacham Ovadya in Levi’at Hen, Menuhat Ahaba and Shemirat Shabbat K’hilchatah.
The Poskim prohibit wearing reading glasses in to the public domain. Since they are only used for reading and one is unlikely to read while walking in the public domain, he is likely to take them off and carry them. Therefore, if one forgot to bring his reading glasses to Shul before Shabbat, he is not allowed to wear them to shul on Shabbat. This is the consensus of Hacham Ovadia, Hacham Ben Sion and the Menuhat Ahaba.
The Poskim are stringent regarding wearing sunglasses. Even if worn on a sunny day, it is possible that it will become shady and the person will take them off and carry them. Nevertheless, there is room to be lenient in place that has an Eruv that one does not usually rely on. Prescription sunglasses are permitted, since he needs them to see, there is no concern he will remove them.
In cases where it is permitted to wear glasses, one can also wear a strap attached to the glasses. The strap is considered "Batel" (subsumed) to the glasses. Of course, it is prohibited to remove the glasses from his face and wear them dangling from his neck.
It is permitted to wear contact lenses and eyeglasses in the public domain.
It is prohibited to wear reading glasses in the public domain.
One may be lenient and wear sunglasses on a sunny day in a place that has an Eruv, even if he usually would not rely on that Eruv for regular carrying.