Why do many organic halogen compounds smell or taste sweet?
The taste of halogenated organic compounds mainly depends on the halogen atoms involved. Study showed that halogenation of aliphatic series imparted sweetness and halogenation of aromatic compounds increased/decreased the intensity of sweetness/bitteness. This increase/decrease of intensity is due to the efficacy of halogen atoms which is directly related to electron withdrawing power (Hammett $\pu{\sigma}$ value). This is called AH-B theory of sweetness$\ce{^{[3]}}$. Effect of halogen substituent on aromatic compounds to impart bitterness was in opposite trend when compared to effect of halogen substituent on aliphatic compounds to impart sweetness. For example, halogenation of  aminonitrobenzene compounds impart sweetness$\ce{^{[1]}}$. Nitroaniline has a relative sweetness of 40 and substituting halogen at para position respect to nitro group increases sweetness (chlorine: $\pu{x 400}$, bromine:  $\pu{x 800}$, iodine:  $\pu{x 1250}$).

Commercially, chlorine played an important role in imparting sweetness in organic compounds. One instance is halogenation of saccharin. Substituting fluorine at para position imparts sweetness but a bitter aftertaste. Substituting chlorine imparts sweet but with accentuated bitterness. Substituting bromine enhances sweetness but it is extremely bitter. Substituting iodine loses is sweetness leaving a slight bitter aftertaste. Chlorination of other halogen compounds like sucrose and its derivatives, tryptophan, saccharides, lactose, maltose has also been studied where sweetness/bitterness increases by many folds$\ce{^{[2]}}$.
Notes and references

Taste by Lloyd M. Beidler
Taste Chemistry by R.S. Shallenberger
Robert Shallenberger and Terry Acree proposed the AH-B theory of
sweetness. Simply put, they proposed that to be sweet, a compound
must contain a hydrogen bond donor (AH) and a Lewis base (B)
separated by about 0.3 nanometres. According to this theory, the
AH-B unit of a sweetener binds with a corresponding AH-B unit on the
biological sweetness receptor to produce the sensation of sweetness. (Wikipedia)