Is a maple tree with a squirrel hole in it safe to tap?
With the disclaimer that I've never actually tapped a maple tree, I'm pretty sure this is okay, assuming the hole doesn't indicate the tree is unhealthy.

Everywhere I've seen, for example this guide says that you can tap trees as long as they're mature enough - at least 10-12 inches in diameter. I did find some references (like this one) which additionally say that you should only tap healthy trees. These guidelines are really just to make sure that tapping the tree doesn't harm it too much, and that the tree is actually going to be able to produce sufficient sap with enough sugar in it.

But a hole that squirrels play in? Plenty of trees have holes in them, and as long as we're not talking about a gaping wound in a sickly tree, it should be fine. The tree isn't actually exposed in the hole, unless it's recently created or extremely large.

Now, given that you say the hole is "large": trees grow over wounds, trying not to leave them exposed. If a wound is sufficiently large, it may not be able to repair it effectively. At this point, again, it's the tree's health that's the issue, not food safety - you don't want to tap a tree that's already struggling to heal. So if the hole is large enough to worry about this, you should inspect it: see if the tree has grown a new solid layer over the wound, or if it's exposed and decaying from the inside. If you want to know more details about what to look for, I'd suggest gardening.stackexchange.com; they'll be better at answering specifics about tree health than us!