From the places I have heard the term, it seems to mean a strictly rhythmic motif, as opposed to a short melodic theme. Specifically, it's been used in the description of the snare drum part in the second movement of Bartok's Concerto for Orchestra
There's a good article in Groves dictionary which describes it. Originally a signal for soldiers to return to quarters (otherwise known as "Retreat"), as mentioned by @PJTRaill, this function has become more-or-less obsolete over the years.
From what I read about, the local annual Tattoo in my area is a series of concerts, parades, and performances. Including Military, police, and civilians performing historic re-enactments, dances, acrobats, choirs, military displays & competitions, dramas, comedy, etc...
Here is where I found the information; http://www.nstattoo.ca/about-us/what-is-a-tattoo