Th determination involves somethign called the facts and circumstances test.
From WSJ's Law Blog:
Tax-exempt groups organized under section 501(c)(4) of the Internal Revenue Code may engage in some political activity, but they must be “primarily engaged” in promoting social welfare.
But deciding what counts as too much political activity is far from an exact science. The IRS is supposed to apply what’s known as a “facts and circumstances” test, basically a souped-up version of “know it when you see it.”
According to an IRS guidance memo from 1995, the IRS is supposed to weigh a myriad of factors like “the amount of funds received from and devoted to particular activities; other resources used in conducting such activities, such as buildings and equipment; the time devoted to activities (by volunteers as well as employees); the manner in which the organization’s activities are conducted; and the purposes furthered by various activities.”
A political educational organization that qualifies for a 501(c)(4) exemption must “conduct its activities in a non-partisan manner.” A group’s philosophy may be consistent with that of a major political party, but that’s OK if its activities are primarily educational.
If “its activities are under the direction of a Board of Directors whose members were appointed by the national committee of a major political party,” that’s a problem, according to the guidance memo. If the group “selects issues to study based on the needs of the party, and receives substantial financial support from the party,” that’s also a red flag.
An “action” group — another type of 501(c)(4) — may engage in political campaign activities if those “activities are not the organization’s primary activity.”
These circumstances make one wonder how any of these groups were granted tax exempt status.