It very much depends on the glue. Some would be toxic to the plants and animals inside the aquariums, but all the ones recommended in this article, if used in the ways we recommended them, are perfectly safe for aquariums.