Tomfoolery in modern English has no sense of gender beyond the name Tom being present in the word. It is a combination of tomfool + -ery
That said, it derives from Middle English Thome Fole: Tom the Fool.
From the Online Etymological Dictionary: Tomfool - "buffoon, clown," 1650, from M.E. Thom Foole, personification of a mentally deficient man (1338), see Tom + fool. Tomfoolery is recorded from 1812. (Sorry, the link on etymonline.com seems to be broken, I found this at the bottom of the Dictionary.com entry)
So, at some point it did refer to a man.
Personally, I think it is perfectly appropriate to refer to the actions of either men or women as tomfoolery.*
*Note: You may find people who insist on gender scrubbing or equality in terms like this, but my advice is to stop speaking to these people immediately. You will just be happier. Take my word for it....