I know that giving a pokemon poffins makes it happier, but what does it mean when it raises a Pokemon's stat (i.e. cool, tough, smart)?
Poffins make your pokemon happy if their eating the ones they like. the flavour also stands for a type of contest like spicy=cool and so on, which help in the visual part of the contest.
Those stats are for entering pokemon in pokemon contests in Diamond/Pearl/Platinum.
They also have pokemon contests in 3rd gen. but used Pokeblocks instead of Poffins. But the same stats still apply.