As an European, I agree. At the very least, I think that we have the right to protect our borders.
However, this is not an isolated thing that can be morally decided independently of the rest of our foreign policy. We have provoked and participated in many wars in neighboring countries to defend our "economic interests". We are supporting authoritarian dictatorships in Africa so that European enterprises exploiting their natural resources have an easier job. Heck, when a neighboring country (Libya) threatened a bit our cheap oil supply (that is, our supply of their oil) we got all angry and violent and provoked a war there to change the regime.
Most of the immigrants in question come from countries that we have messed with. We certainly have the right to close our borders to them, but to do so we must first stop destroying and exploiting their countries.