难怪 can be used to express that the speaker finds something unsurprising. It can be used alone or in a variety of different structures, as shown below.
难怪 as "it is not surprising that"
Here 难怪 is used to convey the speaker's lack of amazement at a situation, having recently acquired some new information that in his opinion explains it. It is used in much the same way as 怪不得, which can replac 难怪 in the structure without altering its meaning.
Structure 1
难怪/怪不得+([observation])
Examples
小张 请假 了,难怪 今天 没有 看到 他。
Structure 2
难怪+[observation],原来+[reason]
Examples
难怪 这里 人 这么 多,原来 在 打折。
难怪 as "is not to be blamed"
Structure
(这也)+难怪+specific person/people
Examples
难怪 他,他 还 是 个 孩子 呢,什么 都 不 懂。
When used in this way it expresses that the speaker assigns no blame in the situation he is describing. Sometimes the specific person undeserving of blame is mentioned directly after 难怪, as in the first two examples. Often however the context makes clear who this person is and this is not necessary, as in the final example.
难怪 as "inevitable"
Similar to 难免,here 难怪 operates as an adjective meaning that something is inevitable.
Structure
A是难怪的。
Examples
这么 多 工作,忘 一 件 是 难怪 的。