Molasses does multiple things to muffins. Since it is a liquid that's made of sugar, it adds moisture and a chewy texture. It gives muffins a dark color and caramel-like flavor. It also reacts with baking soda to create lift for a lighter texture.