Is it legal for a 501(c)(3) charitable organization to donate to a 501(c)(6) trade association?
Yes, but you have to be careful about what you are doing. If the charitable organization is a private foundation (and not a public charity), it may make a grant to a 501(c)(6) trade association for a specific charitable purpose if the foundation exercises “expenditure responsibility” over the grant. Expenditure responsibility essentially requires a heightened application process and more stringent reporting to assure that the grant is used solely for the stated charitable purpose. (See Ready Reference Page: “Outflanking Foundation’s Public Charity Defense”)
If the (c)(3) is a public charity, it can make a grant for charitable purposes without the expenditure responsibility requirements of a private foundation but will still want to assure that the funds are not being used for the private benefit of the association members. Especially where the (c)(3) and the (c)(6) are related entities, the IRS wants to assure that charitable funds, for which deductions may have been claimed by contributors, are not used for non-charitable (and non-deductible) purposes. In an egregious case, a charity could lose its exemption for private inurement or private benefit.
Under the federal tax law, a trade association can always give to a charity, but a charity has to be very careful in giving to a trade association.