"the lungs," c. 1200, literally "the light (in weight) organs," from light (adj.1); also see lung. Obsolete now except in phrases like to knock (someone's) lights out.
U.S. military signal for lights out in soldiers' quarters (played 15 minutes after tattoo), 1824, from tap (v.), on the notion of drum taps (it originally was played on a drum, later on a bugle). As a soldier's last farewell, played over his grave, it may date to the American Civil War. The tune was revised several times in mid-19c.