As much as I know it is mention in Manu Samhita(it is not sruti scripture, it is smrti scripture) chapter 5. verse 5.
"5. Garlic, leeks and onions, mushrooms and (all plants), springing from impure (substances), are unfit to be eaten by twice-born men."
I did not remember that anybody claim that it is sin. It is jus unfit for pepole who are on spiritual path.