Maybe you can wear sunglasses instead of goggles if you not going to skiing too fast. But ski goggles are recommended for the sake of your eyes. As we know, there will create many winds with swarf snow and dust in the air when you skiing. But sunglasses may not prevent those debris from all side of your eyes. But wearing ski goggles can protect your eyes well from that potential dangers.
It is ok to wear sunglasses while skiing on warm sunny days. If you go skiing on cold and overcast days, you'd better wear goggles instead. Goggles can protect your eyes from cold wind and the glare reflected from snow. Otherwise it can damage your eyes and put you at risk of Snow Blindness. Skiing goggles are designed for skiing, so they are much safer than regular sunglasses. Sunglasses may fall off your face while running while goggles cannot. So goggles are the best for skiing.