Preheat oven to 375 degrees. Grease bottom and sides of a 9x13-inch baking dish with butter or oil.
Break open the chilies and wash out seeds. Line the bottom of the baking dish with the chilies.
Slice the cheese into medium-sized pieces and place on top of chilies to cover evenly.
In a large bowl, beat eggs with sour cream until well blended. Add salt and pepper to taste. Pour mixture over chilies and cheese.
Bake uncovered for 30 to 40 minutes. The eggs are done with a knife inserted into the dish comes out clean.
Top with Pico de Gallo and sliced avocado if desired.