Tear off 4 (18- x 12-inch) sheets of aluminum foil; lightly grease 1 side of each sheet.
Place 2 chicken legs and 1 ear of corn in center on lightly greased side of each foil sheet. Sprinkle evenly with salt and pepper; drizzle corn evenly with butter. Spoon barbecue sauce evenly over chicken; top evenly with beans.
Bring together 2 sides of each foil sheet over ingredients, and double fold with about 1-inch-wide folds. Double fold each end to form a packet, leaving room for heat circulation inside packet. Place packets on a baking sheet.
Bake at 450° for 40 minutes. Carefully open packets to prevent burns from hot steam. Serve with desired toppings.