LONDON—The killing of two people by a convicted terrorist on early release from prison has highlighted a growing challenge for security services in the U.K. and across Europe: the return into the community of people who have served time in jail for terrorism offenses.

The attack in the London Bridge area on Friday—by a knife-wielding man who was convicted in 2012 for being part of a group that was plotting to bomb the London Stock Exchange—has thrust the sentencing of terrorists to center stage in the campaigning in the Dec....