The English Civil War saw Parliament fighting against the Royalists (those who supported the King, Charles I). Somerset was one of the few remaining Royalist places, and so the owner of Nunney Castle let refugees and Catholics (or indeed, Catholic refugees) hide away in the castle.
I enjoyed my time at the castle. There was no one there but a small group of mildly disinterested school children. It was nice and quiet, and feels a bit more like a castle that happens to be in the park, than an attraction for tourists. It was however a slightly muddy and wet day, so maybe in the summer it will be more busy.