Preheat the oven to 350°F. Butter three or four shallow gratin dishes or one or two deep ones.
Melt the butter in a skillet over medium heat. Add the onion and cook for 4 minutes, stirring often. Add the garlic and corn and cook for 3 to 4 minutes. Add the chicken and Buffalo wing sauce. Simmer for 3 minutes, stirring often. Remove from the heat and set aside.
Combine the cream cheese, mayonnaise, and ranch dressing mix in a large bowl. Beat with an electric mixer for about 1 minute, or until soft and fluffy. Add the blue cheese and chicken mixture. Blend evenly with a wooden spoon.
Divide the mixture among the prepared dishes. Sprinkle diced tomato and cheddar cheese evenly over the portions. Bake on the center oven rack for 25 to 30 minutes, or until bubbly and golden.
Note: This dip can be prepared up to 24 hours before baking. Fill the gratins with dip, cover with plastic wrap, and refrigerate.
Preheat the oven, then remove the plastic wrap and bake as directed. Starting cold, the dip may need a few more minutes in the oven.
Buffalo Wing Sauce
Buffalo wing sauce, which is sold under a variety of brand names, is a spicy blend of hot-pepper sauce, butter (or other fat), seasonings, and vinegar used most often in the preparation of buffalo chicken wings. (Did you know that the wings originated in the New York city of the same name?) The heat intensity varies between brands, so apply a little and taste (then add more, if desired) whenever you try a new one.