If your tractor has a computer then it would be a good idea to disconnect it. I don't think it would hurt to disconnect the battery too, but neither do I understand how it could help. Is it to prevent damage to the battery itself? If so, it's worth pointing out that the battery is the most robust electrical component on the machine; even more stout than the wires that connect to it. Or are we thinking that the battery completes a circuit, so removing it is like opening a disconnect and preventing current from flowing in any circuit?
There are only two ways I can conceive that welding could damage electronics:
1. By raising the electrical potential of one ground higher than that of another ground, causing current to flow through electrical circuits in ways that it isn't intended to flow. And I think that would happen whether or not the battery was connected. The best way to prevent that is to place your ground clamp as close as possible to the area being welded.
2. By inducing high frequency EMI into wiring harnesses. This also is possible with or without the battery connected. The best way to prevent this is to keep ground lead and welding lead as far as possible from any machine wiring, and if you must cross a wiring harness with a welding lead, do it at 90 degrees, never running alongside a harness.