As there are different kinds of salts which contain different minerals, is there a kind of salt that is better to use when baking?
Does the kind of salt depend on what I am baking?
Salt that is used for food consumption is always meant to be sodium chloride (and may or may not contain other things such as iodine). Other "salts" (to use the term in the chemistry sense) such as potassium chloride are not generally used by themselves for human consumption or specified in food preparation, even though they are potentially safe to eat.
Sea salt is still 85% sodium chloride but because it has additional chemicals/elements/compounds in it, does have a different taste.
For best results when baking, use plain table salt, sodium chloride, with or without iodine (which is added to provide a necessary nutrient for those not living near a salt-water source of fish or not eating enough salt-water fish). Note from the link that sea salt does not contain enough iodine to supply a nutritionally adequate amount.
When baking, kosher salt is ideal. Kosher salt has no additives, so you are getting nearly pure, unadulterated sodium chloride.
There is one issue with using kosher salt, its grains are corser than average table salt, so it is less likely to dissolve in recipes with little water and there is less mass per a unit volume. To accommodate for this, one can grind the salt finer or use a greater volume (1.5 to 2 times more is common).
Table salt can be used but it usually contains sodium iodine and anti-clumping agents that can have undesirable effects on baked goods.