Tenses
I am struggling with the differences between (Präteritum) and (Plusquamperfekt) and (Perfekt)
Let us start with this. It has already been said that german and english tenses don't map one-to-one. Take, what i write as a rule of thumb:
Präsens is used for things currently taking place and is more or less the same as the english present tense.
Ich gehe in die Stadt und kaufe eine Hose.
Präteritum is used for storytelling or relating stuff and similar to the english past tense. Notice, though, that Präteritum is rather used in written language. In everyday speech commonly the Perfekt is used instead.
Ich ging in die Stadt und kaufte eine Hose.
Perfekt is used for things that happened in the past and are finished. It is used similar to the present perfect but also colloquially for relating stuff. It second purpose is to express a succession of events (see below):
Ich bin in die Stadt gegangen und habe eine Hose gekauft.
Plusquamperfekt is not normally used. Its english counterpart is the past perfect and its purpose is to express a certain succession of events (see below):
Ich war in die Stadt gegangen und hatte mir eine Hose gekauft.
succession of events
If one event happens before another it is possible to express that by using cetain combinations of tenses. The rule is: if the main sentence is in Präsens then what happened before is in Perfekt.
Ich gehe in die Stadt, davor habe ich eine Hose gekauft.
If the main sentence is in Präteritum then what happened before is in Plusquamperfect.
Ich ging in die Stadt, davor hatte ich eine Hose gekauft.
Applying this to your example:
Thomas ist froh, weil er sein Abitur mit 1,7 bestanden hat.
The main sentence is "Thomas ist froh" and it describes something taking place right now. He got his diploma before and hence the relative sentence about it is in Perfekt, according to the rule explained above.
Would the main sentence be in Präteritum (i.e because it is from a novel) the relative sentence would be in Plusquamperfekt instead:
Thomas war froh, weil er sein Abitur mit 1,7 bestanden hatte.
In both cases the succession is the same: first he got his diploma, then he was happy.
Notice that this explanation is NOT exhaustive. There are fringe cases and the german language also has other methods of expressing a succession of events.