The reason oil is used in baking is to add and keep moisture in your baked goods. Oil essentially coats the flour, then traps the gasses produced by the chemical reaction of the leavening agent, slowing down the gluten formation and keeping your treats fluffy and delicate. So cool.
When choosing which oil to use, it actually comes down to flavor more so than science. Canola oil is the most commonly used oil in baking because it has virtually no flavor and therefore doesn’t affect the flavor of your product. Its smoke point is very high, making it ideal for hot ovens.
Coconut oil is another common choice for baking. It also has a relatively high smoke point, which makes it a good oil for baking. While it is a solid oil, it can be melted easily, which makes it a great option for batters or doughs. One thing to note about coconut oil is that unrefined or virgin coconut oil does have a bit of a coconut flavor, so if you do not want that flavor, go for refined.