In a mixing bowl, combine the brown sugar, soy sauce, minced garlic, grated ginger, chili flakes (if using), and lime juice. Whisk these ingredients together until the brown sugar is dissolved and you have a smooth marinade.
Take your boneless, skinless chicken breasts or thighs and place them in a resealable plastic bag or a shallow dish. Pour the marinade over the chicken, ensuring each piece is well coated. Seal the bag or cover the dish and let it marinate in the refrigerator for at least 30 minutes.
Choose your preferred cooking method: grilling, baking, or slow cooking. If grilling, preheat your grill to medium-high heat. For baking, preheat your oven to 375°F (190°C).
For grilling: Place the marinated chicken on the grill and cook for about 6-8 minutes per side. For baking: Arrange the chicken in a baking dish, pour any remaining marinade on top along with pineapple chunks, and bake for about 30 minutes. For slow cooking: Simply place everything in your slow cooker and let it work its magic on low for 4-5 hours.
If grilling or baking, add pineapple chunks or slices to your grill or baking dish during the last few minutes of cooking.
Make sure to check that your chicken is fully cooked through—it should reach an internal temperature of 165°F (74°C).
Once cooked, remove your chicken from heat and let it rest for a few minutes before serving. Garnish with fresh cilantro.