If we're being really honest, then a Tam O'Shanter isn't actually associated with the Irish. It's most definitely a Scottish traditional hat.
But they're all Gaelic, so who cares when there's whiskey in the jar?
It gets its name from the Rabbie Burns poem of the same name. Tam is a farmer, who has all kinds of unfortunate adventures while reeling home late from the pub. O'Shanter is a play on words. The Scottish dialect mishanter means ill luck or the Devil.
He escapes his witchy pursuers and makes it home intact, so perhaps there's luck there anyway; and this particular Tam O'Shanter hat is green. So you have the luck of the Irish to throw into the mix.
To really underscore the Irishness of these caps, you could opt for a knitted version. It's decorated with shamrocks and has Erin Go Bragh written on it. You don't get much more Irish than that.
Erin Go Bragh translates as Ireland Forever, though it's semi-Anglicized. The actual Irish Gaelic phrase is Éirinn go Brách, despite the other being the more commonly seen!