When baking, is it better to use a gas or electric oven?
For baking cakes and breads it is important to control the humidity in the oven. In early stages of baking one typically needs the humidity to remain in the baking chamber, which is hard to do with a gas oven.  Two of the bakeries near my house use electric ovens with brick lined baking chambers; the other uses gas. 

Expansion

Gas and electric ovens can be built to bake the same way if cost is not an issue.  Most home gas ovens will circulate the combustion products (mainly water vapor and carbon dioxide) in the cooking chamber.  As the flames burn, combustion products need to be vented out of the baking chamber.  Electric ovens also need vents in the baking chamber to help maintain the pressure as the air inside expands.

Steam is essential in the initial stages of baking for good crust formation in breads and crack-free cake surfaces. The oven cavity can hold much more steam than released from the gas combustion and it is my inference that the steam content of an electric oven will be higher  (I cannot find published steam measurements inside ovens). After the dough expansion, the vapor coming off of the dough or batter needs to removed quickly for browning and for the inside to cook well.  The constant flow in a gas oven makes it better at that. In an electric oven a peep or two during the last baking stages will handle excess moisture.



Two bakeries near my house use electric ovens, the other, which makes excellent French baguettes, uses a gas oven.  The baker there has had both electric and gas ovens and he prefers the caramelization of the gas oven.  But note that he can handle the moisture problem with the steam injector of his professional gas oven.  He also noted that using gas ovens require skill as they have temperature and moisture quirks.  

Recipes may be adapted to either gas or electric ovens.  In the US the majority of recipes are designed for the electric oven (they're more popular).