In China, weight comments are more casual than in Western culture. Friends might call each other 胖子 as a nickname without necessarily meaning offense, but it's still best to avoid it with strangers.
usage
The -子 suffix turns the adjective 胖 into a noun referring to a person. Compare: 瘦子 (shòuzi, thin person), 矮子 (ǎizi, short person).