651 (cont.). – He adds, of whom the world was not worthy. As Dionysius says in an epistle to John the Evangelist: wicked men by what they sometimes do, show the indications of their damnation; hence, he says that when wicked men separated the blessed John from them, God was showing that they were unworthy of being associated with him. Therefore, the Apostle says, the world was not worthy of them. As if to say: Worldly men were not worthy to associate with the just: 'I have chosen you out of the world; therefore, the world hates you' (Jn. 15:19).
652. – Then when he says, wandering over desert...s, he shows this in regard to their place, because they had no dwelling of their own, but roamed about in deserts, in mountains and in dens and caves of the earth, which are places suited to contemplation and penance. It is called a den, if it is made by art; but a cave, if it is from nature or by some accident, as water corrosion. These are plain in the cases of David (1 Kg. 22:1) and Elijah (1 Kg. 19:9).
Source: Commentary on Hebrews