Why did Tory blow Cally out of the airlock Battlestar Galactica S04E03?
The four secret Cylons were going to be exposed anyway. Did Galen ever know that Cally was killed by Tory versus committing suicide?
While their discovery was likely inevitable, Tory was afraid of dying. Fear of death makes humans do irrational things. One of the key story elements of Battlestar Galactica was how human (or not) the Cylons were.
As for did Galen find out? That's a plot element in the finale, Daybreak:
Galen discovers what Tory did during a goo-bath mind-meld as they're about to give the Cylons the secret to resurrection. He breaks the meld (and Tory's neck), prompting the Cylons to resume fighting.
Did Galen ever know that Cally was killed by Tory versus committing suicide?
In the series finale Daybreak while the Final Cylons's minds are linked together Galen sees Tory's memories of killing Cally.
This revelation triggers Galen to break from the download procedure and strangle Tory.
As for why Tory killed Cally...for a variety of reasons I suspect.
Tory did what was best for everyone, at least in her mind. She acted on behalf of herself naturally, but she was protecting Tigh and Tyrol too. She probably understood the ramifications if word of their true nature was revealed. On top of those facts, Cally was about to kill herself anyway, Tory gave her what she really wanted.
Although I agree with both answers in fear being one big potential motivator for Tory in this instance, I specifically find Tory to become ruthless when feeling insecure (see ongoing relationship with Laura Roslin).
In addition I think there is more to this event that meets they eye, because of the reveal that not only is she one of the final five, but also because of a later reveal from episodes: Sometimes a Great Notion & No Exit...
She was once Galen's lover!
(^Ties That Bind)
Tory at times can be jealous and spiteful. I believe in hindsight looking back, this was something more "deep-seated" and was also about Tory taking Callie away from Galen, so she could be close to him...