Pull off and throw out chile stems. Split chiles open and discard the seeds and ribs.
Place chiles in a bowl and cover with boiling water. Let stand until chiles become soft, about 20 minutes. Drain, reserving the soaking liquid.
In a medium skillet set over medium heat, stir the cumin seeds for 30 seconds, and then add the oregano and stir until cumin is toasted, another 30 seconds.
Transfer cumin mixture to a food processor or blender, then mix in the drained chiles, 1 cup of the reserved soaking liquid, the vinegar, sugar, garlic, and salt (if using). Puree, adding more soaking liquid if needed to make a smooth mixture.
Pour chile mixture into a glass baking dish.
Rinse chicken thighs, remove and discard skin, and pat dry with paper towels. Remove and discard any visible fat.
Place the chicken in the chile mixture, turning to evenly coat. Wrap in plastic wrap and chill for at least 30 minutes or up to 4 hours.
Light a grill or preheat the broiler.
Place chicken thighs on the grill and cook, turning occasionally until juices run clear when pierced with a fork, about 8 minutes per side. Serve at once.