In Traditional Chinese Medicine (TCM), Huang Qi belongs to the 'Tonic herbs for Qi Deficiency' category. Tonic herbs are used for patterns of Deficiency, when one lacks one of the 'Four Treasures' (Qi, Blood, Yin and Yang). Qi tonics are typically sweet and they tend to enter the Spleen and Lungs because these Organs are most involved with the production of Qi.
Furthermore Huang Qi is Warm in nature. This means that Huang Qi tends to help people who have too much 'Cold' in their body, although with less effect than a plant that would be Hot in nature. Balance between Yin and Yang is a key health concept in TCM. Those who have too much Cold in their body are said to either have a Yin Excess (because Yin is Cold in nature) or a Yang Deficiency (Yang is Hot in Nature). Depending on your condition Huang Qi can help restore a harmonious balance between Yin and Yang.
Huang Qi also tastes Sweet. The so-called 'Five Phases' theory in Chinese Medicine states that the taste of TCM ingredients is a key determinant of their action in the body. Sweet ingredients like Huang Qi tends to slow down acute reactions and detoxify the body. They also have a tonic effect because they replenish Qi and Blood.
The tastes of ingredients in TCM also determine what Organs and Meridians they target. As such Huang Qi is thought to target the Lung and the Spleen. In addition to performing respiration, the Lungs are thought in TCM to be a key part of the production chain for Qi and the Body Fluids that nourish the body. The Spleen on the other hand assists with digestion, Blood coagulation and Fluids metabolism in the body.