If we stick to economics and don't stray into ethical, political, or other perspectives, then the argument for or against immigration depends on the specific economic environment and the point of view of the individuals involved.
To examine the economic advantages and drawbacks of immigration from an academic perspective, begin by reviewing the three main economic issues at the core of the argument: supply and demand, productivity, and comparative advantage.
Supply and Demand
If supply increases while demand holds steady, then prices falls. Therefore, increasing the supply of people available in the labor pool, holding all other things equal, should reduce labor costs and employee wages. Labor costs/employee wages describe the different perspectives of the issue: employers vs. employees. If you are an employer, labor is a cost. If you are an employee, the employer's cost is your wages.
By contrast, if there is an undersupply of labor, as there was in the tech bubble of the late 1990s, the strong demand increases labor costs/employee wages. During the late '90s, unemployment was under 4%, and firms struggled to hire workers. This added to their costs and made increasing their output more difficult.
So, when we think of immigration in terms of supply and demand of labor, whether you find it good or bad depends on which side of the (employment) fence you are on.
The demand for labor was so strong in the 1990s that there was talk of increasing the number of visas to increase immigration and relieve the inflationary pressures on the labor force.
Productivity can be measured by the output for each hour of employee work—the GDP per person—and the effect on productivity from new immigrants may be more or less than the current level. Therefore, while GDP could increase overall as new workers found jobs, the increase may or may not boost the productivity of the workforce. Typically, it would not, but it would depend on the specific circumstances.
If immigrants were highly productive, per capita GDP could increase. However, if the immigrants didn't work or didn't increase productivity, the losses would lower GDP per capita.
Another perspective for consideration is that goods produced using lower cost labor allow for more goods to be produced. Who this benefits can vary. For example, working in agriculture to plant and harvest crops is essential—we can't go without food. Existing laborers may be willing to do this work, but could be less favorable to employers than lower-cost immigrant labor. Introducing the lower-cost laborers may have two different effects: existing laborers move up to more productive work, or they're pushed out into other lower-wage jobs, resulting in more profits for the company but at the existing laborers' expense.
Economists use the term comparative advantage to describe an economy's ability to produce goods and services at a lower opportunity cost than that of trade partners. A comparative advantage gives a company the ability to sell goods and services at a lower price than its competitors and therefore realize stronger sales margins. This concept is usually applied to trade between nations, but it can be applied to immigration.
Take the tech boom as an example. The high-tech workers allowed to immigrate using a new visa program had a competitive advantage over the existing workforce due to their knowledge and ability, not just their lower cost.
The alternative of hiring untrained existing workers - delaying projects while they go through the training process and paying them along the way - is far more costly than simply hiring trained immigrants, even at the same cost.
The Bottom Line
The economic arguments in favor of immigration are that it reduces costs, causing prices to drop and freeing up resources to be used elsewhere. However, if you are a displaced worker and forced to accept lower wages or a position below your training and abilities, you would feel differently. Overriding those two forces is the impact of the economic environment.