What does 也 mean in the dialogue: A: 他迟到了。B: 这也难怪。 今天地铁坏了。 A: 他迟到了。
B: 这也难怪。 今天地铁坏了。

As I understand it, 也 means also or too. I'm not sure how this fits in this sentence.
也 here is an adverbial particle that implies "understandably"

Without 也, the sentence would be:


  " 难怪他迟到, 今天地铁坏了。" - "Since the subway is out of order today, there's no surprise that he was late."


Adding 也 to emphasize it is "understandable" , the sentence would become:


  "这也难怪(他迟到), 今天地铁坏了。" - "Since the subway is out of order today,  it is understandably  no surprise (that he was late).



In the second example sentence, the topic "他迟到" is omitted, and "这" replaced it as a pronoun. it is the same as 也难怪他迟到, 今天地铁坏了。"*
也 means " too" or "also" - " this too is no surprise ". implies it is the same as other common events, so it is "understandable".