I think ”はずだ" means "is supposed "
1). 来るはずです is supposed to come
The speaker expects that someone comes here in the future
「今日あいつ来るの?」
「来るはずです
2). 来るはずでした/だった。 was supposed to come
The speaker expected that someone came here, but actually they didn't come.
「昨日、あいつ、来なかったじゃん」
「来るはずだったのですが…」
3). 来たはずです。had been supposed to come.
The speaker guesses that someone came here, but doesn't know they actually came here or not.
「あいつ、あの時、来てた?」
「来てたはずです」
4). 来たはずでした/だった。 was supposed to come/arrive
The speaker expected that someone came here, but actually, they didn't come.
「結局、あのとき、あいつ、来なかったじゃん」
「ちがう!来たはずだったんだ」
↑
Sorry, I am not totally sure about the explanation for 4.