They're everything a growing boy needs.
Twinkies make their first appearance when we meet Sergeant Al Powell. He's at a convenience story, buying so many Twinkies you'd think they're being discontinued. He swears they're for his wife but the store clerk—and we, for that matter—know better.
We see Twinkies again when John McClane spits one out in a rare quiet moment. It's old, and we're guessing he's not as into the whipped-cream filling as Al is. Still, the mention of the snack gives Powell and McClane a chance to bond and banter, helping to solidify their friendship. Al recites the ingredients from memory (proof, perhaps, that those earlier Twinkies were most definitely not for his wife?), and soon enough the men are talking about their kids.
It's also worth noting that Twinkies aren't the classiest of desserts. They're not something Wolfgang Puck would serve at Spago (where, presumably, Richard Thornburg is headed later). They're an everyman snack, built for everymen like McClane and Powell. They're the workingman's treat.