Basically:
When you log on, anything that will actively help you during your farming or battles such as weapons & armour bonuses for your attacking troops, reductions for the enemy troops and buildings, loot bonuses, vault interest, etc.
When you log off, anything that will passively help you such as weapons & armour bonuses for your defending troops, bonuses for your buildings, reductions for the enemy attackers, loot refunds, etc.