I see this as having been left intentionally vague by the screenwriter. That said, reading through the various film reviews and film interviews, there seem to be two distinct schools of thought on the subject;
Her "Three Laws" programming is still in full operation.
Portia's life without Andrew was clearly intolerable. In an earlier scene, set a number of years before her death, she had already spoken about how she was considering refusing further age-defying treatments. It's pretty reasonable to assume that even if Galatea was still fully under the control of the three laws, she would be able to comprehend "intolerable distress" and could therefore be disconnect the life-support without breaking the first law preventing harm. She's simply weighed up the amount of harm on both sides and is plumping for the lesser.
Her "Three Laws" programming is broken.
Andrew may well have found a way to allow other robots to circumvent the Three Laws. In the film he's clearly aware of how to reprogram other robots as well as having studied his own brain for decades. It's quite plausible that as well as having upgraded Galatea's physiology to be indistinguishable from that of a human, Andrew has also spent some time upgrading her Positronic brain to be more human as well. This would include the ability to cause harm to humans, ignore direct orders and allow self-harm.
Personally I lean toward the first interpretation. Someone living on life-support well past their normal lifespan (and whose sole reason for hanging on has disappeared) would be an obvious candidate for assisted suicide.