Why can blood group O be given to all blood groups?
Good question! Let's start with an overview and explanation of the ABO blood grouping system (Dean, 2005):



Blood groups, antigens and antibodies: Subjects with blood group A carry the A antigen on their red blood cells (RBCs) and have antibodies to antigen B; subjects with blood group B have the B antigen and anti-A antibodies, blood group AB carries both the A and B antigens and have no antibodies, and finally folks with group O have no antigens but both antibodies. 

Blood groups and transfusion: Circulating antibodies in a person's blood will attack transfused RBCs from unmatching blood groups. These antibodies fix complement and cause rapid intravascular hemolysis, triggering an acute hemolytic transfusion reaction that can cause disseminated intravascular coagulation, shock, acute renal failure, and death (Dean, 2005). As people with blood group AB have no antibodies, they can receive all blood groups without issues. People with blood group O can only receive RBCs of blood group O, because they carry both antibodies. Blood group A can receive A and O, and blood group B can recive B and O. Hence, blood group O can be received by all other groups, and is therefore the universal donor. 

Typically, literature on transfusion deals with the haplotyping the antigens of the donor RBCs. The question whether the antibodies in the donor's blood with blood group O would start attacking cells in recipient with blood group A, B and AB is, therefore, a very good question. And the answer is: yes, they will. Why then is O still the universal donor as they have both anti-A and anti-B antibodies?   

First, whole blood is not used for "routine" blood transfusions (Torrens University Website). Instead, blood component therapy has largely replaced the use of whole blood (Patient.co.uk website). For routine transfusions, only the fraction containing packed red blood cells is transfused (Mayo Clinic website). Hence, in these cases, the blood plasma containing the antibodies is (virtually) removed after centrifugation. Since O-type red blood cells contain no antigens (Dean, 2005), and the plasma with the antibodies are not transfused, it can be donated to everyone, barred that the rhesus factor matches.

Secondly, even if plasma is transfused, antibodies in the donor's plasma are a minor problem, because of the small amount of antibody present in the donated plasma, which is further diluted on transfusion into the recipient's circulation (Dean, 2005).

Reference
- Dean (2005) Blood Groups and Red Cell Antigens. Chapter 5.The ABO Blood Group