I've been caught out badly by this, but with some planning you can happily work through a blood moon, here's my list of suggestions:
1 Go mining: With a good stockpile of relevant supplies especially wood you can just go for a long dig and ignore what's going on above
2 Fences: A good fenced off "garden" can allow you to carry on working, though some mobs are still a threat particularly bliz,blitz etc.
3 Defensive points against the above, a good block to shelter behind
4 Bow and plenty of arrows
5 Door defences: nothing quite says zombie-be-gone like a bucket of lava poured from above
6 An escape tunnel: If your front door is being camped by ranged attack mobs consider sneaking out the back
On a more positive note Blood moons are part of Random Things, which has some crazy cool stuff
On the subject of door defences an MFR Grinder will work through a wall, it doesn't need line of sight.
Darn door grinders can be crazy-productive. Called something else now, mob masher or mob crusher? Either way it is a good source of essence and damaged enchanted gold armor