Yes, it is generally recommended to disconnect the battery before welding on a vehicle. Welding can create electrical currents and sparks that may inadvertently damage electronic components or cause a fire if the battery is connected. By disconnecting the battery, you reduce the risk of electrical interference and ensure a safer working environment.