It is not necessary to cover green bean casserole while it bakes. Covering it with foil can actually increase the amount of time it needs to bake through. If the top of the casserole is browning too quickly, you can loosely tent the top of it with foil, but I have never found this necessary.