Formic acid is primarily used as a pH adjuster and disinfectant in the water and wastewater treatment industries. It helps in maintaining the appropriate pH level for effective treatment processes and acts as a powerful sanitizer to kill harmful microorganisms.