To make the beer batter, whisk the flour, egg, oil, and salt together in a medium bowl. Whisk in just enough beer to make a thick, clingy batter. Do not overmix. Let stand at room temperature for 30 minutes while roasting the chiles.
To roast the chiles under the oven broiler, arrange an oven rack 6 inches from the broiler and preheat over HIGH heat. Broil the chiles until the tops are blackened and blistered but not ashy white, about 5 minutes. Turn the chiles every few minutes until all sides are blackened.
To roast the chiles in the oven, preheat oven to 500 degrees. Line a baking sheet with aluminum foil for easy cleanup. Arrange the whole chiles in a single layer on baking sheet. Bake for 30 to 40 minutes, until the skins are blackened and blistered but not ashy white, turning occasionally to promote even roasting.
To roast chiles over an open flame, turn a gas flame (or two) to HIGH. Arrange chiles directly over the flame. Using tongs, turn the chiles occasionally until all sides are blackened and blistered but not ashy white. This method sets off the smoke detector in my house.
Transfer to a bowl and cover tightly with plastic wrap. Let stand until chiles are cool enough to handle, about 20 minutes.
Leaving the stems on and chiles intact, carefully rub off and discard the blackened skin (I wear gloves and use paper towels). Using a small, sharp knife, cut a slit in one side and remove the seeds from each chile.
In a medium bowl, combine Monterey Jack cheese, tomatoes, and onion if using. Divide the mixture among the chiles. Using wooden toothpicks, close up the slits in the chiles. Set aside.
Preheat oven to 200 degrees. Place a wire rack over a rimmed baking sheet lined with foil.
Preheat deep fryer or pour 2 to 3 inches of oil into a large saucepan or Dutch oven. Heat to 360 degrees on a deep-frying thermometer.
Working with 1 or 2 chiles at a time, dip the stuffed chiles in the beer batter, letting the excess batter drip back in to the bowl. Place in hot oil and deep fry, turning once (I use two spatulas), until golden brown, about 4 minutes.
Using a slotted spoon or wire skimmer, transfer chiles to the wire rack in the oven to keep warm. Repeat with remaining chiles. Serve with rice and beans if desired.