If a community center, owned by a 501(c)(3) public charity, rents space to a for-profit entity and that for-profit uses the space to generate income for itself, is the nonprofit's tax-exempt status at risk? The only income the nonprofit would derive is the rental income with no share or participation in the for-profit's activities.
Rental income by itself should not jeopardize your organization’s federal 501(c)(3) charity status. A charity may have rental income, and so long as the property is not subject to a mortgage and the owner is not providing significant personal services not normally provided by a landlord, the income is not even subject to unrelated business income tax (“UBIT”). (See Ready Reference Page: “Nonprofits Often Worry About UBIT”)
If the property is exempt from real estate tax at the local level, however, the charity is likely to lose its real estate tax exemption for the property, at least for the portion of the property used for non-charitable purposes. This is a state law issue, but if you enter into a lease with a for-profit, be sure that you require the for-profit tenant to pay any taxes that may arise because of its use.