At the beginning of the episode, the Silence didn't want the Doctor to speak his name (like all of the other aliens in the sky). So why did they help get rid of those aliens (particularly the Daleks) at the end of the episode?
It is true that the Silence did not want the Doctor to speak his name. However, the Silents in this episode were associated with the Papal Mainframe, which was revealed to be an intergalactic peacekeeping force. By assisting the Doctor in his efforts to stave off the enemy forces, they also managed to keep him from saying his name - as long as the forces were being held back (which they were, as it was stated that all of the races besides the Daleks either burned or fled), the Doctor would not have had to have risked the planet's destruction by releasing the Time Lords and inviting an assault by the alien forces, who would have attacked as soon as he spoke his name.
The Papal Mainframe of the Church of the Silence (or Silents?) was committed to keeping the Doctor from speaking his name and bringing back the Time Lords. The stalemate over Trenzalore was this:
The Daleks and other hostile aliens wanted to destroy Trenzalore and any possibility of the Time Lords ever returning
The Doctor wanted to protect Trenzalore from war. If the Daleks etc. attacked, the Doctor would speak his name and the Time War would begin again.
If the Daleks etc. left, the Doctor could bring back Gallifrey in peace, however the Daleks don't want this to happen
If the Doctor left, the Daleks would destroy Trenzalore, preventing the Time Lords from ever returning.
The Church of the Silence's goal was to keep the Doctor from speaking his name. They fought against the Daleks in order to keep the Doctor from having to bring back the Time Lords to protect Trenzalore. Because the church was fighting on his side, the Doctor had allies and enough support that he didn't have to resort to restoring Gallifrey. Also, the Mother Superious was an old "friend" of the Doctor's and naturally wanted to help him. They briefly mentioned that a sect of the Church decided to keep Silence by killing the Doctor before he could make it to Trenzalore, which is everything that happened in season 6. They were renegades from the Church in Time of the Doctor (kind of an extremist faction).
The Silent's only concern was the safety of Trenzalore. Once Tasha Lem was certain of The Doctor's intentions, she would command the Silents to assist The Doctor in any way they could.