My daughter is 6 going on 7 and her underarm smell foul. When can I start her on deodorant?

At any time. Malodorous body parts are due to bacteria, not a medical condition. It is ok for your daughter to use underarm deodorant at any time. Try not to make her self-conscious about it. It's a common problem.
Check diet. This is a common complaint and not a problem. I have one mom who se daughter and the problem and she stopped dairy and it went away. I had another adult who stopped red meat and it went away. Anecdotal stories but may be helpful to you.
Today. The glands in the axilla can begin changing their activity in response to awakening of the adrenal glands. This can occur as early as six, and is not directly tied to puberty. If you notice a thickening of genital hair, appetite change,increasing rate of growth or nipple enlargement,she needs to see her doc.Otherwise just include this as part of her daily routine.