Abrahm nailed the safe plastics list pretty well. I'll add to it with acrylic (clear), PETE 4, PTFE and polycarbonate. Urethane is also generally safe, but many types can degrade structurally over time in water.
To the do not use list, Nylon is number one, less for toxicity (though it does leach a few things out when exposed to water) but more for its tendency to absorb water and break down over time. Nitrile, neoprene, BunaN and similar rubberized plastics should also be avoided. Silicone plastics are safe only if specifically rated as such for aquarium use(This includes silicone sealants and RTV).
Polystyrene foam (both open and closed cell) is a touch and go situation. One must be very careful as to the source as many of these foams ( such as the ones used for industrial packaging and insulation) can be contaminated with everything from machine oil to scary stuff like cyanide and arsenic. The rule of "When in doubt, leave it out." applies here.
The final thing to watch out for is ANY plastic listed as static dissipative. This is usually pink, green, or blue in color. While not toxic in most cases, the static dissipative properties are achieved by bonding (no joke) pig fat to the polymer. The pig fat (read as Lard) attracts a microscopic layer of water to allow ESD. This can cause structural failure over time and makes a great place for harmful microorganisms to grow. As a result, these materials usually get additional chemical treatment to inhibit such growth which will leach into you water.