I think immigration has very-little to do with terrorism in real-terms, and correlating the two is an error.
A philosophy which suggests terrorism will stop - if we could only "close the gates" - is misplaced for two reasons, imo.
Firstly, it would not be surprising if the perpetrator is eventually found to be a UK citizen. It's certainly been the case with many other Islamic terrorists who have committed atrocities on UK soil, and it's hard to see how a tighter immigration policy would help, when it comes to these types of individuals.
Secondly, pursuing tighter immigration as a means to control terrorism, simply means wasting money/resources in an area that will provide limited material benefit. Such money and resources as are available to fight terrorism, would be better committed in other areas, such as additional surveillance of suspects, intelligence-gathering, de-radicalisation programmes etc. IMO.