Digital Camera/Smartphone vs Scanner
I originally wrote this before the advent of smartphones with good quality cameras in them. These days, all high end smartphones contain good cameras, equaling the quality of many point & shoot digital cameras (although not DSLR camera quality). They still don't match the camera control aspects of a digital camera (i.e. optical zoom, adjustable arpeture, etc.)
I generally hate to do head to head comparisons, but I get asked this question a lot. There are advantages and disadvantages to both. In general, a scanner will do a better job than a digital camera or smartphone camera. If you have a lot of old photos to digitize, a scanner is the best solution and worth the investment (a good photo scanner is not very expensive). It will outperform pretty much any digital camera or smartphone camera when it comes to resulting image quality and most can also scan negatives and slides. However, since many people now have a smartphone with a good quality camera, it can be used in circumstances where a scanner is impractical.
Digital Camera/Smartphone - it's portable and can be easily brought to the subject (i.e. your old Aunt's photo or letter collection, cemeteries, archives(with permission), etc.) and used on location. It can be used to photograph 3D objects (heirlooms and such). Delicate albums in which you don't want to remove the photos or bend the album flat over a scanner can be photographed in place. Larger items that won't fit on a scanner such as family artwork can be digitized with a camera. Once setup for photo copying, a digital camera is generally much faster than a scanner.
Scanner - a good scanner has higher resolution digital cameras, photographs are pressed flat by the scanner cover (no distortion/focus problems), some scanners do a good job with slides (digital cameras, in general, do not), scanning software generally provides for more control than a digital camera or smartphone.
I have and use both my scanner and my cameras for genealogy. I generally use a scanner at home when copying a few photos or documents. The camera comes in handy, when, as noted above, I'm not at home (copying photos/documents at a relative's house or at a library or archive), or if I have a delicate photo album to copy. Normally, copying old photos is not a reason to buy a digital camera (you'll generally be better off with a scanner), but if you already have a digital camera or smartphone, or plan to buy one (or a new one), then you might want to consider its use in genealogy.
For some tips on what to look for in a camera for genealogy see the Choosing a Digital Camera Page.
For some tips on how to use a digital camera to make copies of old photos see the Copying with a Digital Camera Page.
For some tips on how to use a Scanner to copy photos, negatives and slides, see the Scanning Page.
Resolution of a Scanner vs Camera
How exactly does the resolution of a scanner compare to a digital camera? The quick answer is that you can't actually compare since it depends on the size of the image being scanned.
If we took a 4" x 6" photo for instance and scanned it in at 600 dpi, we would get a digital image that is 2400 x 3600 pixels in size which is 8.6 megapixels. If we took an 8.5" x 11" photo and scanned it at 600 dpi we would get a digital image that is 5100 x 6600 pixels in size which is 33.6 megapixels. Given that many scanners today can go to at least an optical resolution of 3,200 dpi, scanning an 8.5" x 11" page at that resolution would result in a 27,200 x 35,200 pixel size image which is 957.4 megapixels.
We can also look backwards, an 18 megapixel camera that takes photos with 5184 x 3456 pixel dimensions will resolve a 6" x 4" photo at 864 pixels per inch. If it took a photo of an 8.5" x 11" page, it would be resolving it at 406 pixels per inch.
Bottom line is that scanners have higher resolution than digital cameras.