"What if something happened to him?" past simple. This can be about the past, present or future. It is most likely to be used about a hypothetical future event. Example: John is going to town tomorrow and is not going to take his mobile phone. How would he call for help "if something happened to him".
"What if something has happened to him?" present perfect. The speaker is worried that something bad happened in the past. The speaker chooses present perfect because they do not know whether the situation is continuing. In other words, it is continuing to the present (and possibly into the future) in the speaker's mind.
"What if something had happened to him?" past perfect. The event has passed and the speaker is talking about something unreal in the past, an imaginary situation. If things had been different then the consequences would have been different. He did something which was dangerous (possibly) and there were not bad consequences. However, there could have been bad consequences.
I hope that helps a bit. A lot of words, sorry.