Yes. The prescription of eyeglasses is the same as that of sunglasses. You can use the same prescription to get your sunglasses. However, if you get your eyeglasses prescription several years ago, you'd better have an eye exam before you get sunglasses so that you can know whether your prescription has chnaged or not.
Of course you can. The prescription for sunglasses and eyeglasses is the same. But sometimes a prescription won't work in certain frames, especially if it is a wrapped frame. So make sure your sunglasses frame is in a moderate size.