Losing weight depends, it's possible you could continue to gain weight if you don't cycle and eat properly, and if you diet at the same time you might get thinner but you could also get weaker on the bike.
On average a cyclist riding at 15 mph will only burn about 40 calories per mile of riding so do the math and you figure out how many calories your burning. You need to reduce fat in the foods you eat while increasing carbs to about 60 to 70% of your eating which means you should have less than 30% in fat. Rides that burn fat the best are the slower longer rides of around 6 hours in length, of course there is the scientific method that says use a heart rate monitor and aim at working around 70 to 75 percent of your max heart rate for most rides, if you do that you'll lose weight. And then just because you're hungry after a ride doesn't mean you shove a large pizza down your throat, don't stuff yourself, in fact you should feel just very slightly on the hungry side if you want to lose weight. Also do away with ALL sugary products especially soda, candy, cakes, adding stuff to coffee, etc, the sugar content will actually make you crave for more food; the weird thing is once you do away with sugary stuff and then say 3 months go by and you have soda for example, it will actually taste nasty and you'll wonder why you ever drank it in the first place! Also cut back on alcohol, all it is is just empty calories, it's ok to have a small half a glass of red wine at dinner, but that's it as far as a daily thing, and never binge drink; I have one glass of dark beer about once every 2 to 3 months and that's the limit of my alcohol. Speaking of empty calories don't eat snacks like chips etc. Don't eat while riding, most rides are only an hour or less, there is no need to eat doing those, for extended rides after that first hour you need about 60 to 90 grams of carbs per hour to avoid bonking, so do the math for those long fat burning rides to figure out how much food you need to have on a ride.
I'm not going to lie to you just because this is a cycling forum, but running is better for weight loss than cycling! HOWEVER, running is harder on your joints and bones and in the long run could screw up how well you get around when your older and thus your quality of life could be a lot less. Plus with cycling you can actually travel places in the same time that would take you to run and get nowhere far. Also I did the math once and over the long haul cycling is cheaper! As bazaar as that seems. A pair of nice mid level running shoes will cost you about $150, those shoes will last on average 400 miles; a set of really nice $150 a pair tires will last about 3,500 miles, that means you will need 9 (rounding up) pairs of shoes for every set of tires, that equates to spending about $1,350 in shoes over the same 3,500 miles that the tires lasted, **** for $1300 or so you could buy a pretty nice bike! Of course on average a runner will take about 2 years to run those 3500 miles whereas a cyclist will do that in a year if not a bit more, but it's the outgoing expenditure I wanted to point out that I felt was interesting. I use to run a lot, I didn't realize that cycling was cheaper for many years after I started cycling and gave up running, and I was shocked when I did the math. Of course the upfront cost for cycling is far greater but once the cost is paid it's just small nick pick stuff after that for a very long time; of course too there are those who have the need for a new bike every 3 to 5 years which is crazy in my mind since all my bikes last well over 30 years, in those cases cycling will be more expensive than running, if your not racing there is no need to buy more than one bike every 20 years if then.