Pasta Salad can sit out of the fridge for up to 2 hours before it starts to go bad.
If you're not gonna eat the pasta salad or serve the pasta salad within 2 hours you should refrigerate it.
If you've left the pasta salad out overnight it should be thrown out because bacteria probably has grown on the pasta salad and could make you sick.
Always refrigerate the pasta salad if you're not gonna consume it within 2 hours and in the refrigerator the pasta salad can last up to 5 days.