The grilled peppers and onions are one of the best parts of fajitas, but they are a bit tricky to get just right. You want a nice (but not excessive) amount of char, and you also want everything to be cooked through and to be in suitable sized pieces. I have tried a number of techniques over the years. This is my current favorite. The picture mostly shows grilled onions since the grilled peppers were almost all eaten!
A thin extra grate with smallish holes helps to keep the peppers and onions from slipping through the grill once they have softened.
Onions, peeled and cut in half halfway between the two ends
Peppers, seeded and cut into one inch strips
Olive oil
Start the grill and heat it to a moderate temperature, staying below 400 degrees. Lightly oil the cut onions and peppers with olive oil. For the peppers, this can be conveniently done by putting them in a plastic bag with a little oil and shaking the bag. For the onions, I like to use a brush.
Cook on the grill until there is a moderate amount of char. Remove from the grill, cover with aluminum foil and put in a very slow oven (200-250 degrees) for about an hour until completely soft. I used an electric box smoker without any woodchips, since it is designed to operate low and slow, but a conventional oven at a low temperature could also be used.