With Sunder you are hitting a target that is immune to critical hits, so getting a 20 (or whatever) on the dice roll do nothing extra.
Not true... The object being an object is immune to critical hits, but you still crit, and thus can trigger additional affects such as a flameburst weapon. The creature is not immune to that crit damage though, so it is not as clear cut a question as you might think.
You still crit, with all the effects of critting, including the extra damage. It is just that the object is immune to that extra damage. If the normal damage is enough to destroy it though, should the wearer take it? Maybe? If the attack did bonus non-lethal damage, would you have the wearer take that? The answer should be the same.
You have hit something that is immune to critical hits? You don't get to roll extra damage for the critical hit (other effects are a different matter).
You are damaging the creature with leftover damage for that attack, you aren't hitting it with a critical hit.
Diego is entirely correct. You've struck an object, which is immune to critical hits. You don't get extra dice for the crit. As toastedamphibians points out, if you have a bursting weapon, you'll still get THOSE if you confirm... but if you're just using, say, an adamantine great axe? Bupkis, sorry.