Regular glasses and sunglasses are not designed to provide the same level of protection as protective eyewear. Regular lenses can shatter upon impact, posing a risk to your eyes, and do not meet the ANSI Z80.3 standard for sports eye protectors.
Sunglasses may offer some UV protection, but they lack the necessary impact resistance and do not provide adequate side protection from objects that could enter your field of vision during sports activities.