How do I clean air tanks?

In order to 'do it right', you'll also have to treat the inside with some sort of coating or plating to prevent the rust from returning.

There's several ways people seem to do it. Pipe threader chucked to a length of pipe installed into either end of the tank (if equipped with bungs) then add some media (crushed gravel) and detergent (clothes washing type can work). Followed by generous rinsing, an acid etch followed by more rinsing and then drying and coating. A decent primer, or epoxy paint, or ospho, or corrosion inhibitor (LPS 3 or similar) - though if you're ever going to spray paints, I'd go with a paint on type coating versus an oil or wax type inhibitor.

Preventative maintenance is key, and after ANY work on a pressure vessel, it's best to do a hydrostatic test to ensure it's up to snuff. There's all kinds of instructions on the internet about how to hydro a tank, and it should be done to 1.5x the max operating pressure.