What do the Vedas say about animal sacrifice?
Animal sacrifice, when performed properly according to Vedas, is an exception to the general rule about not harming living beings. Here is what Adi Shankaracharya says in his commentary on the Brahma Sutras:
We proceed to refute the remark made by the pûrvapakshin that sacrificial works are unholy because involving harm done to animals ... Now from scripture we derive the certain knowledge that the gyotishtoma-sacrifice, which involves harm done to animals (i.e. the animal sacrifice), &c., is an act of duty; how then can it be called unholy?--But does not the scriptural precept, 'Do not harm any creature,' intimate that to do harm to any being is an act contrary to duty?--True, but that is a general rule, while the precept, 'Let him offer an animal to Agnîshomau,' embodies an exception; and general rule and exception have different spheres of application.
Ramanujacharya, in his commentary on the Brahma Sutras here, goes further and argues that animal sacrifice is not even contrary to the principle of Ahimsa, because the animal experiences rewards in the afterlife which far outweigh the momentary suffering it experiences:
For Scripture declares that the killing of sacrificial animals makes them to go up to the heavenly world, and therefore is not of the nature of harm. This is declared in the text, 'The animal killed at the sacrifice having assumed a divine body goes to the heavenly world'; 'with a golden body it ascends to the heavenly world.' An action which is the means of supreme exaltation is not of the nature of harm, even if it involves some little pain; it rather is of beneficial nature.--With this the mantra also agrees: 'Thou dost not die, thou goest to the gods on easy paths; where virtuous men go, not evil-doers, there the divine Savitri may lead thee.' An act which has a healing tendency, although it may cause a transitory pain, men of insight declare to be preservative and beneficial.
So it would be like taking your kid to the dentist; they may temporarily suffer some pain, but in the long-run it's beneficial.
As I discuss in this question, Madhvacharya and Baladeva Vidyubhushana, the Dvaita and Gaudiya Vaishnava commentators on the Brahma Sutras, say much the same thing. In any case, this is largely a moot point, because almost no one performs the animal sacrifices described in the Vedas anymore. (This is due to a variety of factors like the rise of Buddhism and Jainism and the substitution of corn-flour animals by Madhvacharya.) Pretty much the only animal sacrifices performed in India nowadays are to goddesses like Kali, but I don't know of any statements in the Vedas that grant a similar exception to the principle of Ahimsa in that case.
Note: “The question: What do the Vedas say about animal sacrifice?” is licensed by Stack Exchange Inc (https://hinduism.stackexchange.com/); user contributions licensed under CC BY-SA.