In a large bowl, whisk together lime juice, olive oil, cilantro, garlic, cumin, chili powder, salt, black pepper, and red pepper flakes (if using).
Add the chicken thighs to the marinade, ensuring they are well coated. Cover and refrigerate for at least 30 minutes, or up to 4 hours for more flavor.
Preheat your grill or oven to 400°F. If grilling, oil the grates to prevent sticking.
Remove chicken from the marinade and discard the remaining marinade.
Grill the chicken thighs skin-side down for about 6-7 minutes, then flip and cook for another 6-7 minutes, or until the internal temperature reaches 165°F. If baking, place thighs skin-side up on a baking sheet and bake for 35-40 minutes.
Let the chicken rest for 5 minutes before serving. Garnish with additional cilantro and lime wedges if desired.