May a person perform or otherwise participate in experiments on live animals which will cause the animals pain? I would assume this is forbidden under tzaar baalei chayim. But perhaps there is a heter for scientific purposes?
Rabbi Yissochar Frand has a tape on inflicting pain to animals.
Generally the prohibition is on inflicting pain for no good reason, and legitimate medical research is a good reason. He quotes a responsum -- I believe it's the Shvut Yaakov -- about a doctor testing a medicine on a dog or cat first, who allowed it, but said it's ideal not to do the procedure yourself, as you'd be training yourself to be insensitive to suffering. (I corresponded with Rabbi Yehuda Herzl Henkin shlit'a about this, and he didn't see this latter point as an issue.)
Rabbi Frand concludes he's not sure whether cosmetics are considered enough of a cause; Rabbi Yitzchok Breitowitz gave a public lecture a few years ago in which he felt they weren't.
(Mind you, some neighborhoods/cultures have much stronger expectations about women's cosmetics. Rabbi Dovid Miller of Yeshiva University's Gruss Kollel in Jerusalem has an mp3 in which he discusses a mikva-related heter involving makeup, with a comment to the effect of "I don't know, in my world if you don't wear makeup whatever, but in the Charedi yeshivish world, if she's not totally painted, something's wrong!")
This is addressed in a recent post on Torah Musings by Rabbi Daniel Mann. He says that tzaar baalei chayim can be necessary for experiments if it isn't needlessly insensitive. If there is a human need that is not baal tashchit then it can be fine. Animal rights are also not comparable to human needs:
There are several Torah statements along the line of “Have dominion over the fish … birds …” (Bereishit 1:28). Furthermore, we are permitted to take an animal’s life simply because we desire to eat meat. We may enslave animals to do hard labor, with some restrictions (not Shabbat, muzzled).
He qualifies this by saying that the level of pain is a factor and that going beyond a threshold (for a menial task) would not be acceptable.
There is also a distinction between the type of animal experimented on:
Rav Yaakov Emden (Sheilat Yaavetz I:110) says that tza’ar baalei chayim applies only to animals with which man works (e.g., cattle, horses, donkeys) or perhaps relatively highly cognitive animals (dogs, cats), but not to “lower creatures,” who experience pain differently. According to these opinions, it does not apply to insects, and likely not to rodents.
...and concludes that there it is permitted to experiment on animals, given the inherent gain to humans, however with several understandable caveats:
limit the number of animals used, and minimize pain (including using lower species). Suffering animals should be euthanized as promptly as possible.