The New York Times online recently posted an article about the legality of photographing artwork in galleries. Often visitors to many galleries are not allowed to take pictures because the work on display is contemporary or on loan from the artist or another gallery. Some galleries do allow visitors to photograph or otherwise copy some of the artwork on display. With the proper permission, some galleries allow artists to bring an easel and set up shop for a short time. Many times the galleries will clearly post whether photography is allowed, and when in doubt, the security guards will always know for sure.
There are other considerations to take into account when photographing art in a gallery. The NY Times article seemed to make the assumption that a simple snapshot taken on the fly would be an accurate facsimile of the artwork on the wall. There are a number of factors that can make taking pictures in a museum difficult. Lighting in most galleries is kept dim as way to preserve the artwork on display. The dim lighting can in turn make it difficult to get a sharp image handheld, especially with a point-and-shoot camera. While some galleries will allow photography, none that I know will allow the use of flash. Often, artwork is framed with glass or plastic in front of it, which can create rather ugly reflections. The reflections sin the glass may not be much of a distraction when viewing the artwork normally, but can easily ruin pictures.
Pictures can be a great way to remember a trip to a see a famous artwork or museum, but for an accurate copy of the works, the gift shop is often the best place to visit.