Pumpkin carving has been around for a long time. It started with the Irish, who would do so during Halloween. However, they did not start out carving pumpkins. Instead, they would carve turnips. This is because Ireland did not have pumpkins readily available, so they used turnips, which is what they had.
The idea was that if they carved pumpkins, they would cast out evil spirits in their homes. As far as why pumpkins are carved now, one reason is that, in the United States, they are everywhere, especially during fall time. Stores have them on display, and there are pumpkin patches all over. Along with that, pumpkins are bigger, making it easier to carve.