If that AC cord coming out of your computer goes directly into a wall socket, you're putting your Mac at the mercy of the power company, your home's wiring, and all the things that can go wrong in between: brownouts, voltage spikes, lightning, you name it. Your Mac's power supply is pretty robust, but a single random power surge can still fry its circuits. Even when the electricity appears to be flowing correctly, imperceptible fluctuations in the current can cause computer components to deteriorate more quickly than normal.
So please, take the basic precaution of using a surge protector. They come in many shapes, sizes, and pricessome with every bell and whistle, and some quite plain. Not all work equally well, so look for a model with a good warranty that covers not only the protector itself but also the equipment attached to it, in the event of a surge.
Better yet, consider buying a small UPS (uninterruptible power supply). A UPS contains a battery with enough juice to power your computer for anywhere from a few minutes to a few hours, along with circuitry to convert the battery's DC output to AC and switch over to the battery instantly and seamlessly in the event of a power outage. If the power goes out for more than a very brief period, the UPS sounds an alarm so that you will know to save your work and shut down your computer safely before the battery goes out. (Some UPS units include software to handle automated shutdowns.) In addition to protecting your computer from power outages, a UPS conditions the electricity flowing through it and absorbs surges.
My favorite UPS manufacturer is APC (American Power Conversion). To find one of their models that suits your needs, use their product selector at www.apcc.com/template/size/apc/. Other UPS manufacturers that offer Mac-compatible software include: