This depends primarily on how the material responds to heat treatment. Some materials will develop brittle phases in the heat-affected zone, such as high-carbon steels developing untempered martensite.
Conversely, most structural steels used in outdoor construction are intended to be welded without subsequent heat treatment.
If you are welding a heat-treatable steel, your options are to do a post-weld stress-relief or to heat above the martensite start temperature prior to welding.