There's a debate going on how Luffy got the scar on his chest but I recently seen episode 223 where Zoro and Luffy we're fighting and Zoro gave him that scar. Then for what reason is there a debate on how he got his scar?
I think Luffy got the scar during Marineford War. It's on Vol. 59 Chapter 578 and Episode 487.
After his brother Ace died, Jinbe carried him and tried to escape to Akainu. Jinbe jumps into the sea but finds the water below to be frozen. Akainu manages to strike Jinbe and harm Luffy at the same time. Jinbe apologizes to Luffy for letting him get injured.
It can be seen in this image that Luffy's chest is burning after Akainu's punch past through Jinbe's body.
One Piece Wiki also did mention how Luffy got the X-Mark after the time skip
After the Timeskip
After those two years, a few things have changed. Luffy wears an open, long-sleeved red cardigan with four buttons (which shows the X-shaped scar covering most of his chest he received by then-Admiral Akainu), with a yellow sash tied around his waist, somewhat reminiscent of Gol D. Roger's outfit. He has grown slightly taller and is shown to be significantly more muscular due to his training. This can be seen in his slightly thicker neck, more pronounced deltoids, and better-defined chest.
It was well-known that the Red Dog's (Sakazuki/Akainu) Magma Fist hit the Luffy's chest several times. The most crucial piece of evidence is that in the Fisherman's Island, Zoro and Luffy said that when the Red Dog was promoted to Fleet Admiral, Luffy subconsciously grabbed his chest, and it is obvious that the pain caused by the Red Dog is still very clear. So in summary, the scar on the chest of Luffy should be left by the Red Dog. Luffy will definitely let him pay back 100 times in the future, together with Ace's share.