Cycling is great exercise, and exercise leads to weight loss - if (and this is a crucial if) all else remains constant. In other words, if you used to drive to work and now you cycle, while maintaining the same diet as before and the same amount of physical activity outside your commute, you will lose weight.
The problem is that all else usually does not remain constant. For one thing, cycling makes us ravenous, and more often than not we end up consuming enough (or even more than enough) extra calories to make up for the fact that we cycled to work instead of driving. So while we do build up muscle which will cause parts of our body too look more shapely, our weight is likely to remain the same unless a conscious effort is made to also control our diet. This does not entirely coincide with the "cycling will make you thin" narrative - which presents the life of cyclists as filled with tasty foods, beer, and weight loss. If you cycle a lot, but also eat a lot, your weight will stay the same. If you cycle a bit, but eat even more, your weight will increase. That is the reality.
Even if you are not looking to lose weight, but are in the "cycle a lot, eat a lot" category, there are caveats to consider. Over the Summer and Fall, I cycled so much that my diet changed drastically just to accommodate the constant energy loss and hunger pains. Things that I hadn't freely indulged in for years - pizza, ice cream, obscene amounts of chocolate, random snack foods - became regular dietary staples. As long as I continued to spend large portions of my day on a bike, I could feel like a pre-teen at a slumber party again when it came to eating, with (seemingly) no ill effect.
But what happens when that amount of daily cycling becomes unsustainable - due to either the arrival of a harsher season, travel, or a change in work schedule? Once you get used to consuming large amounts of food, it can be extremely difficult to cut down, even after your level of physical activity decreases. The reasons for this are partly physiological (stomach size; metabolic processes), but to an even greater extent psychological. We use food not just for sustenance, but for comfort and for social bonding. Having grown used to eating pizza and ice cream late at night with friends, it can feel sad to give that up. Once we grow accustomed to a lavish diet during a period of intense cycling, chances are we will be tempted to maintain it even during those times when we do not spend as much time on a bike. This can lead to an overall weight gain for those who cycle.
I've had several private discussions now with cyclists who feel disappointed because they hoped to lose weight through cycling, only to have gained it. They don't understand what went wrong. Moreover, they feel ashamed because many cycling blogs do project the image of the "healthy and fit" (meaning slender) cyclist and contrast this image to that of the overweight driver who eats burgers and guzzles cola behind the wheel.
Cycling and weightloss only go hand in hand if you control for the other factors, and that is not always simple. For me it has been effortful to prevent out-of-control weight gain this winter, after my time on a bicycle fell to maybe 10% of what it was in earlier seasons. What has been your experience?