I have been taught to say thanks when getting up (or about to get) from the table. Or saying thanks if someone gives something to you, whether it is a dinner or someone hands a hammer to you (when hammering something).
Based on answers it is cultural thing to say thanks in Europe, in US it isn't.
__________________
|