Refugees and immigrants are not the same. The former are forced to leave their home countries due to war, persecution, extreme destitution, and lack of opportunities, etc. Trauma and poverty are usually among the heavy burdens they carry. I would even argue that most illegal "Latino immigrants" in the United States are, de facto, illegal refugees. In contrast, immigrants have willingly decided to live in another country to improve their lives and that of their families, and usually prepare themselves by purposely taking with them whatever education, skills, experience, and resources they may have.
There is, however, another point: the question about them as threats or opportunities for Western host countries deserves further qualifications. If interpreted in utilitarian terms, its meaning becomes unacceptable for a Catholic ethicist, who sees, as Kant's second Categorical Imperative also does, human beings as ends and never as means. In short, the right thing to do with refugees and immigrants should not to be determined by any cost/benefit analysis. This is not to say that one should put aside considerations about the difficulties and benefits associated with welcoming them. It is clear that they may pose a number of risks for hosting countries: costs associated with incorporating them into the fabric of society, the difficulty of integration, and even the risk of (particularly in the case of refugees) inadvertently receiving terrorists, etc. Conversely, immigrants and refugees bring with them obvious benefits. What is at stake must be considered in light of the common good.
In the Catholic tradition, social issues are illumined by social moral theology. An important part of it is constituted by certain official teachings we call Social Teachings of the Church, contained in a series of documents issued by the popes since 1891. The last one of these is Pope Francis' encyclical Laudato Si' on the environment, published last year. In this corpus, which has been organically and gradually developed in time, the project of modernity has been evaluated, criticized, and re-casted in theological terms. This has also been the work of Catholic social ethicists and theologians. The frameworks in which these considerations are made are both theological and philosophical. Hence, it makes use of key notions such as the Kingdom of God as a mystery already present in history in and through Jesus Christ; the Incarnation as redeeming mankind and everything human, in a way that sheds light on every social issue; and the predilection of God's love for the poor and marginalized. In addition, it makes use of realist philosophy, particularly that in connection with Thomas Aquinas.
In what ways can the Social Teachings of the Church shed light on the issue at hand? Two principles come to mind: (1) the principle of common good and (2) the principle of the primacy of the human person. Both principles are based, following Augustine, on a notion of justice that consists of giving each his or her due. The common good is the set of conditions under which individuals and groups in society more easily achieve the goods that are due to them for what they are. For any given society assimilating refugees and immigrants should not jeopardize such conditions. Attending to the basic needs of members of society, assuring the creation of job opportunities, offering means for the wellness of families, strengthening various kinds of associations and non-for-profits, etc. are all conditions that should be met. This is why non-developed countries are not necessarily morally obliged to accept refugees or immigrants. Whereas, developed countries are obliged because they have the resources and are better equipped for ensuring their common good (institutional, cultural, material, etc.).
However, in the particular case of refugees, accepting them may also entail taking into account that society is supposed to serve its members and, above and beyond that, other human persons who do not belong to it. Let me explain. For example, it would not be immoral for someone who is starving to take a loaf of bread from others without asking for consent: the duly recognized right for private property, which exists as corresponding to the human good of a given individual, is superseded when a more basic good of another human being is not being met. There is a hierarchy of goods implied here. In the specific case of refugees, we find a similar situation. In light of this, there exists an ethical obligation on members of affluent societies, and their leaders, for going beyond their comfort zones and personal standards of living to give up some of what is due to them in order to attend to the emergency of those who, having fled their places of origin due to war or persecution (religious, political, or any other kind), see their lives at risk in overcrowded camps, are under the threat of illness and have no future.