Of illegal immigration or the nanny state, which is the greater problem? Only within the context of terrorism can I say that illegal immigration might be the greater of the two problems. If a terrorist sneaks a nuclear bomb across the border, the possible damage negates comparisons to any damage a nanny state can do.
However, terrorists with nukes are the worst case scenario. Terrorism itself is the worst part of illegal immigration, but I would not call it the largest probable impact of it. As long as our military is in Iraq and Afghanistan, most terrorists will take the easy way out and try to hit our military.
Illegal immigration tends to bring higher crime rates with it. Also, there are too many places where the illegals are eligible for benefits, which leaves taxpayers paying for non-taxpayers. In addition, with the wealth flowing from this country back to the immigrant's home country, we are losing a lot of the economic benefit we could be getting from the wealth in the U.S.
The nanny state is a whole new level of problem. The more government does for the people, the more people expect from the government. We have seen the results of this in France and in New Orleans (during Katrina). This is a vicious cycle, where government is forced to raise taxes to pay for all of its' benefits, eventually stifling productivity and killing the golden goose of the private sector. The worst part is that it takes at least a generation to undo the damage, and that would probably come after a period of anarchy.
Illegal immigration is bad, but the far-reaching impact of the nanny state is much worse.