The three extremists set off a home-made bomb in April last year outside a prayer hall.
The three extremists, all 16 at the time, set off a home-made bomb in April last year outside a prayer hall where a Sikh community wedding was taking place, also leaving two others with lesser injuries.
The youths, who were born in Germany, had met on social media after being radicalised by ultra-fundamentalist Salafist Muslims, and got together to commit the attack in the western city of Essen.
Two of them, identified only as T. and B. because they are minors, were sentenced to seven years and six years and nine months respectively for attempted murder.
The third, identified only as I., was given six years for complicity.
Prosecutors charge they had sought to kill "non-believers" with a device they had built from a fire extinguisher shell and chemicals ordered from online shopping site Amazon.
The power of the blast destroyed the door of the temple and blew out window frames.
A priest was left with a fractured foot bone and has been unable to resume his ministry, said the court.
Two other people suffered superficial cuts.
"The motive of the attack was hatred against other religions. The accused were already radicalised before the act," said the court in a statement.
There were no indications that the attack was linked to the Islamic State group, it added.