IIFYM is an abbreviation for "If It Fits Your Macros," which refers to a form of dieting that emphasizes total caloric intake and macronutrient goals over rigid "meal plan" style diets.
The "IIFYM" phrase started on the bodybuilding.com forums as a way to respond to questions about what foods are and are not appropriate during a diet. "If it fits your macros" was such a common response that people started responding with "IIFYM" and the acronym was born.