Where was Thomas? We don't know, but it is reasonable to suppose that he should have been with the others, if for no other reason than to commiserate with them. We need one another in difficult times; we always need one another for encouragement. This is one reason we attend worship: not only to receive the gifts of God (though that is the chief reason), but also to encourage one another, just by being there. But Thomas was not.
Moreover, he didn't believe when the others told him of the resurrection, though he should have. For Jesus himself had said this on more than one occasion.
So Thomas did not deserve to see Jesus for himself the following Sunday; Jesus' appearance also to him is pure grace. He wants Thomas to believe.
He also wants you to believe, and today you can see that your unworthiness does not impede his coming to you; and today you may also take all your doubts and deposit them into Thomas' heart, where they can be dispersed, even as his own skepticism was done away: "My Lord and my God," he cries.