The SNP leader and Scottish First Minister dismissed calls from Ukip's Paul Nuttall for the Government to introduce a migrant cap.
Speaking on the debate, broadcast on ITV, Mrs Sturgeon said: "The hard reality is our economy needs migration from the EU.
"In Scotland alone, EU migrants contribute £7 billion every year.
Paul Nuttall clashes with Sturgeon and Farron over immigration
Plaid Cymru leader corrects Paul Nuttall after he gets her name WRONG
"Public services are under pressure. That's not the fault of migrants, that is the fault of the austerity agenda pursued by the Tories."
But Mr Nuttall said there were "simply too many people coming to the country".
He claimed the equivalent of the population of Newcastle was added to the UK's population last year.
SNP leader Nicola Sturgeon defended EU migrants during the TV debate
Nicola Sturgeon's most outrageous quotes
Sun, April 9, 2017
The nationalist chief always has plenty to say
1 of 10
'Men – the colour of their tie is the most difficult decision they have to make every day'
The Scottish First Minister clashes with Ukip chief Paul Nuttall
Brexit would never have happened if it wasn't for Ukip
The MEP went on to claim Ukip is the only party committed to cutting immigration to sustainable levels.
He said: "Brexit would never have happened if it wasn't for Ukip.
"We have taken you so far. Elect Ukip MPs and give us the tools to see this through."
Caroline Lucas (pictured with Tim Farron) agreed with Sturgeon
Green Party leader Caroline Lucas agreed with Nicola Sturgeon, saying migrants made a "vital contribution" to the country.
She said: "Those people in our country are our lovers, they are our families, they are our plumbers, our doctors.
"They make a vital contribution to our society and the idea that we are going to be a better off society by closing the door to immigrants is just clearly wrong."