Our 501(c)(3) often gets requests from for-profit merchants to advertise on our website. Can we sell advertising space on our website as a way of raising funds? Would there be limits as to what sort of items/services that could be advertised (obviously not political or illegal items)?
You may certainly sell advertising space on your Website, but the IRS is likely to consider it unrelated business activity and therefore unrelated business taxable income. The IRS does not distinguish among media when considering issues of advertising and generally considers all advertising revenue from any activity that is regularly carried on as unrelated business income. It would not view the Internet differently from a regular newsletter. (See Ready Reference Page: “Nonprofits Often Worry About UBIT.”) As long as this is not a substantial part of your activity, you can pay the tax, keep the profit, and not jeopardize your exemption.
The only special tax rule about content would relate, as you suggest, to political activity. You should not connect to political websites in any way that the IRS could consider participation in an election campaign that could cost you your exempt status. (See Ready Reference Page: “IRS Issues New Guidance on Electioneering.”)