Since our bodies are "the temple of God" (1 Corinthians 6:19) I would say that, yes, it is a sin.
1 Corinthians 3:16, 17 Do you not know that you are God's temple and that God's Spirit dwells in you? 17 If any one destroys God's temple, God will destroy him. For God's temple is holy, and that temple you are.
We have to be careful about stigmatizing the obese as sinners though. There may be metabolic or psychologically mitigating circumstances. Even a drug being taken to control a chronic disorder can have weight gain as a negative side effect. So, we must not be quick to judge and add to the unhappiness of someone suffering from obesity. That kind of negative judgement is much more sinful than the problem we are so quick to condemn.
None of us are immune from the accusation of sinfulness through circumstance rather than an overt act. We need to think about that before we point the finger of blame and shame at others.
For example: Do you drive a car or even use public transport which uses fossil fuels? We know that the burning of fossil fuels is slowly destroying our ecosystem. Are you sinning by owning and driving a car or using transportation based on fossil fuels? Even if you aren't obese, do you eat foods which you know are not good for you? I would assume that you do - the occasional hotdog or a piece of pie or ice cream etc. Are you sinning when you partake of such foods knowing that they are detrimental to your long-term health? Do you fail to exercise regularly even though you know you should and you know that your health will suffer if you don't? Are you sinning by failing to do that?
When I was a teenager, there was a very popular song entitled "Put your hand in the hand of the man..." (speaking of the Lord Jesus Christ). One line of the song says, "Take a look at yourself and you can look at others differently." Or, as the Lord himself said:
Matthew 7:1-5 Judge not, that you be not judged. 2 For with the judgment you pronounce you will be judged, and the measure you give will be the measure you get. 3 Why do you see the speck that is in your brother's eye, but do not notice the log that is in your own eye? 4 Or how can you say to your brother, 'Let me take the speck out of your eye,' when there is the log in your own eye? 5 You hypocrite, first take the log out of your own eye, and then you will see clearly to take the speck out of your brother's eye.
We must do our best to help those with difficult life issues. Blame and shame only adds to their problems. You are not their judge. Remember, you will be judged by God with the same severity by which you judge others. How will your lifestyle choices stand up when subjected to Divine scrutiny?
Hebrews 4:12-16 For the word of God is living and active, sharper than any two-edged sword, piercing to the division of soul and spirit, of joints and marrow, and discerning the thoughts and intentions of the heart. 13 And before him no creature is hidden, but all are open and laid bare to the eyes of him with whom we have to do. 14 Since then we have a great high priest who has passed through the heavens, Jesus, the Son of God, let us hold fast our confession. 15 For we have not a high priest who is unable to sympathize with our weaknesses, but one who in every respect has been tempted as we are, yet without sin. 16 Let us then with confidence draw near to the throne of grace, that we may receive mercy and find grace to help in time of need.
I hope you have found this helpful.