The answer depends on the ingredient. The gel around tomato seeds is the tomato’s most acidic and aromatic part; keep it in sauces and soups, but remove it for salads and stuffed tomatoes because it releases liquid. Peppers are the opposite: the seeds and white membrane carry heat, so remove them even from sweet peppers. Decide based on what you want that part to contribute to the dish.
A tomato has two inner parts: the fleshy walls and the translucent gel surrounding the seeds. The gel carries most of the tomato’s liquid; it is the most acidic and aromatic part of the tomato, and much of its familiar flavor comes from it. That is why throwing away the seeded part means throwing away some of the flavor. The question is whether you want that flavor to enter the dish as liquid or as taste. Keep the gel in dishes where liquid is not a problem; separate it and use it elsewhere when liquid would be a problem.
Do not discard the gel when making sauces, soups, or braises. Tomatoes release their liquid as they cook, and it reduces during cooking; the gel is the most flavorful part of that liquid. The seeds are not a problem in sauce, but if you want a smooth sauce, strain it after cooking and leave the seeds in the strainer. Even if you do not want the seeds in the sauce from the start, do not discard the gel: cut the tomato in half, scrape the gel into a strainer, add the strained liquid to the sauce, and separate out only the seeds. Grated tomato does not need this separation; the gel and flesh go into the sauce together.
The gel can be a problem in salads and stuffed tomatoes. The gel from chopped tomatoes runs onto the plate, waters down the salad, and thins the dressing; it also makes the filling in stuffed tomatoes wet and can cause them to fall apart during cooking. For these dishes, cut the tomato into 4 wedges, remove the gel and seeds with your fingers or a spoon, and chop only the fleshy walls. Do not throw away the separated gel: put it in a bowl and add it to salad dressing or to a soup you are making that day. This keeps liquid out of the salad while saving the flavor for another use.
Peppers are the opposite. The seeds and the white membrane that holds them are the pepper’s hottest parts; in chili peppers, most of the heat is concentrated in that membrane. Even in sweet peppers, the membrane can leave a mildly bitter, fibrous taste. That is why you remove the stem before chopping a pepper and scrape out the seeds and white membrane with a knife. In a chili pepper, leaving some of the membrane is a way to control the heat: the more membrane remains, the hotter it will be. Wash your hands after handling chili peppers, and do not touch your eyes.
For stuffed peppers, remove the membrane and seeds completely because they occupy the space needed for the filling; when cutting off the stem, avoid removing more flesh than necessary. For roasted peppers, the seeds come away with the skin. Do not discard the liquid left from roasting; strain it and add it to a meze or sauce. Seeds in dried peppers add heat and are often shaken out. In short, keep the seeded part of tomatoes for its flavor, separating and reusing the liquid where it is unwanted; remove pepper seeds and membrane from any dish where you do not want their heat, and discard them.