烊 originally meant 'to melt metal.' In the Wu dialect (Shanghai area), 打烊 came to mean closing shop — possibly from the image of a blacksmith finishing work by letting the metal cool.
register
打烊 is more colloquial and common in spoken Chinese. In formal writing, 关门 (guānmén) or 停业 (tíngyè) are preferred.