If you often get marks on your nose from sunglasses, then you may get wrong-sized sunglasses which aren't fitting you well. So in order to prevent marks on your nose, make sure that you have correctly-sized sunglasses that fits you well.
You could try applying some lotion or baby powder to the bridge of your nose before you put on your shades. This helps because the lotion or powder forms a barrier that helps to reduce the friction and pressure of the nose pads against your skin.
You can take your sunglasses to your optometrist. He will affix cushioned nose pads to your sunglasses so that your nose does not directly contact with the nose pad of your sunglasses. Then it can prevent marks on your nose.