The Raspberry Pi has a camera connector, and you can buy a camera with a cable that is designed to plug into it. The genuine article is about $40, but you can buy cheap knock-offs for under $20.
The alternative is to use a USB webcam. The advantage is that these often come with a weatherproof (more or less) housing. Also they may offer better low light performance and even can include IR led's for nighttime illumination. The Pi camera dangles on the end of a cable and will require packaging. But with a direct interface, it should be possible to get a higher frame rate with the Pi camera. My application does not require a fast update rate, so this is moot, and the packaging issue will probably steer me to a USB webcam. It would save time as an off the shelf packaged solution, and might well be more robust.
The lens and angle of view merits consideration. Some kind of xx mount wide angle lens will improve the Pi camera, but add cost.
The ELP USBFHD01 has been mentioned as having (or allowing) very good low light performance. It sells for $53. Only 2 Mpx, but fine for what I am considering.
Tom's Electronics pages / email@example.com