The best way to identify a plastic is to:
But if none of those options are available, chemistry is your next best bet.
I came across this reference PDF for Identification of Polymers. It's great for if you're trying to identify which of the recyclable plastics (categories 1-6) you're dealing with. It also has a means of determining whether chlorine exists in the material. This is important, because some plastics are very dangerous if burned or laser cut/etched (PVC - polyvinyl chloride contains chlorine), and some just smell bad but are relatively harmless. Please heed all warnings in the instructions, and be considerate of the health and comfort of members when using the space. These tests can, and generally should, be done outside.
Note that this obviously doesn't cover identification of all material compositions. For example, if the sample contains metal shavings, that may affect both the density and the flame colour. For a more thorough plastics identification, this burn test table lists characteristics of many more plastics.
Knowing the polymers you're working with is important, especially when laser cutting or burning materials. If you are not entirely confident in the identification of your plastic, you should not be using it in the laser cutter. Consult the Laser Cutter Committee (LCC) if you need help identifying a material, or if your material isn't already permitted. If you are burning or melting plastics for any other reason, intentional or not, it's good to know if the fumes are harmful. For example, PVC is common in wire insulation, so burning wire insulation produces chlorine gas. Avoid this.