There have been TONS of projects that I've seen lately using wood from pallets (those things that companies use for shipping). I have to say I've even been tempted myself. But about a year ago I read an article referencing the dangers and frustrations that can arise from the use of pallets for building projects. I can't find that article, though I'm still working on tracking it down. Anyway, here are some articles that I've found addressing some of these concerns. From bugs to chemical contact, these articles should be taken into consideration before you decide to go forward with this type of material.
Why We Should Not be Using Pallets in our Interiors
Do You Know Where Your Wood Pallet Has Been?
Don't Reuse Wood Pallets
One other concern, which I don't feel is well addressed in these articles, is that these pallets are NOT constructed for the long term. The nails are not always hammered in straight and it's common for these manufacturers to use spiral nails that are VERY hard to remove. These boards can splinter easily, contain knots in the wood, and can otherwise be unwieldy to work with.
While you may still decide to use pallets in your construction projects, pleas heed these cautions. The generally safe way to use pallets would be to use them from a reputable place that doesn't re-use them for shipping purposes, that you inspect them VERY carefully for any signs of infestation (they can easily harbor termites and cockroaches and various other yucky bugs), and to use them for projects that will remain outside (or at least far away from food preparation purposes and bedding).