I've long thought that whether something is terrorism is independent of the motivation. You can be a terrorist for financial gain, such as the villains in 1970s spy movies. You can be a terrorist because of political ideology, striking at those you view as your political opponents. You can be a terrorist for an environmental cause. You can be a terrorist to achieve goals in an otherwise legitimate war. You can be a terrorist seeking to achieve legitimate goals of justice. You can be a terrorist purely to get revenge. It isn't tied to religion or especially to any particular religion. It isn't tied to whether the goals are good. And it isn't tied to whether the ultimate target is bad. Terrorism to achieve an overthrow of an oppressive government is just as much terrorism a kidnapping the kids of rich people to get a ransom, blowing up supermarkets to continue a long-standing conflict, or threatening to use bio-warfare on innocents if your fallen comrades don't get acknowledged by their government as heroes (as in The Rock).
I also don't see how it matters who the actor is. A legitimate government can engage in terrorism just as much as a group of dissidents can. The United States military can use terrorist tactics as easily as a militant revolutionary group. Individual people acting on their own, political organizations out of power, and criminal organizations are no more deserving of the term than governments who oppress their people through terrorism or governments who wage war on others through terrorism.
What is distinctive about terrorism is the use of violence or at least some kind of threat to produce fear in a third party, typically someone innocent of the conflict but at least someone who isn't the primary target. The ultimate enemy is someone else, and this person or these people who are receiving the threat or who are actually being harmed are innocents or relative innocents in comparison to the real conflict going on. It doesn't matter if you're threatening to poison the water supply if you don't get money from the government or if you're burning down homes in Long Island communities because a few manufacturing facilities there are polluting. It doesn't matter if you're flying planes into buildings because you see the majority of the people who work there as complicit in an evil system or blowing up entire cities with nuclear weapons to end a war. The real target is someone other than the immediate victim. It sends a message to someone else, and that's what makes it terrorism.
A lot of people in my Twitter feed are saying the church shooting last night is an act of terrorism and that hardly anyone is acknowledging it because the victims were black. If there is a message that this shooting was intended to spread, then I would say that it is terrorism. It's mainly people on the left who seem interested in pointing out this kind of case as terrorism. Most people wouldn't think of it that way, but it seems like it might be. I don't have a problem with that, provided that the perpetrator really did this so that a larger audience would come away with a certain message. That would indeed count as terrorism, I think.
At the same time, the very same people who are quick to call this terrorism were very hesitant to say anything negative about the Baltimore protestors engaging in terrorist acts. On the above analysis, it's pretty clear that it's terrorism to burn down a home for poor black retirees built by a black church, just to send a message about an unjust system of justice and law enforcement. This, of course, happened in Baltimore. The right called it rioting, and the left called it protesting, but it's terrorism. Those outraged about calling the church shooting terrorism are inconsistent if they don't think that was terrorism too. And the difference is that we knew the motives in that case, since it was part of the larger protesting/rioting phenomenon, which was a reaction to a particular incident we already knew much about (and certainly knew the protestors' view on), while in this one it's still a breaking story, and we need to be hesitant about making hasty judgments when we don't know all the facts. But I think it's clear that both sides of the political spectrum need to realize that there are certain kinds of terrorist acts that they're more inclined to recognize as terrorism and certain ones they're less inclined to recognize as terrorism, and it would be nice if we could be more consistent.