Booze literally fries your stomach and intestinal tract making food absorption poor, also often times makes you so nauseous you can't eat, so you are literally starving yourself.
Much can be water weight as well. I sure as hell wouldn't use some weight gain as an excuse to go back to drinking, there are plenty of healthy ways to get yourself back on track.