First lets get the definitions from a dictionary:
If you look above, both definitions have the phrase
おごそかなこと in them. This is where they are similar in meaning. The difference is in the first characters
威. Lets think of
尊 as representing "value" and
威 represents "power".
Lets look at some examples:
In the above sentences, you cannot replace
威厳. The above sentences talk about something you should respect and uphold. So,
尊厳 is used in phrases talking about rights every human or individual should have, a level of respect, etc. (hence representing "value")
The above is talking more about power and influence over others. If a parent does not have
威厳, then a child is probably not going to listen to them, or if a country doesn't have
威厳 then they probably have to follow the orders from another country and never get their way, etc. (hence representing "power").