It's a good wait to practice anglish.
Although either could be used - they mean the same, it is probably more common/natural to say 'a new pair of...'
The subject here is 'a pair of glasses', new is qualifying it.
A pair of new sunglasses means exactly that: new sunglasses. No idiom involved. A new pair of sunglasses, at least in the USA, could mean a pair is new to you... which includes a new pair or used. It leaves it open. How many times have you heard someone say they bought something new, only to have the other person ask if it was in fact new, or "new to you?"
I bought a pair of new sunglasses
I don't think both are same. Buying a new pair of sunglasses (1 unit) is different from buying a pair of new sunglasses (2 units). Let me know which one is right....