The joke is a pun. Feeling 'crummy,' generally means 'feeling bad' or 'unhappy'.  Baked foods items like cookies tend to crumble and break, leaving behind crumbs, and might make an area 'crummy'.
After burning a batch of cookies a baker felt very crummy .