I had the same problem once.
I solved it with a hex bit in an impact wrench, but that should obviously only be used as a last resort...
After the pins came loose it appeared that they just had been stuck in the corroded aluminium of the caliper, at their small ends - not at the threads strangely enough...
You might get lucky applying WD40 or something like that to the holes in the caliper where the ends of the pins go through and let it soak for a while - beware not to get WD40 or any other petroleum based product anywhere near the brake pistons (those "tubes" that push the pads together) because that might swell their seals and your brake could get stuck...