The late 17th was an exciting time in England, and far more complex than I could describe, no matter how long my comment.
The Tory party was not formed in a single day, not was every Tory born on a single day. There was continuity of actors and motivations.
It would have been politically inadvisable for an English nobleman in the period to be openly Catholic; nonetheless, many of them were, and this was certainly a factor in their favour of James, whose Catholicism was an open secret.
Remember that many of these tories spent a long time in exile, primarily France, a vigorously Catholic country.
Remember also that Catholicism was the state religion in Britain until disestablishment, a scant hundred years prior. Not all of the nobility converted - Mary found plenty of supporters.
I don't have the scholastic chops to back up this idea, but it seems fair to say that crypto-Catholic noble families would have been biding their time, nursing their resentments, and waiting for a chance to restore Catholicism to England. That was surely a factor in their support of James, who was clearly not a desirable king on his own merits - being raddled with syphilis and detested by the commoners.