The emergence of a closer relationship between both sisters reflects a maturation that is evident in Anne's diary. She comes to recognize Margot as less of an adversary and more of an ally. The sibling rivalry dissipates over the course of the narrative. I would say that the tight bond between both is enhanced when they both are sent to Bergen- Belsen. In such a condition, both sisters must rely on one another. This continued the strengthening of their bond. When both of the sisters took sick, this undoubtedly increased their connection and helped both of them to become more close with one another. The growing closeness we saw in the diary became more pronounced at Bergen- Belsen. At the same time, I think that when Margot dies, it removes a bit of Anne's spirit. This indicates how close they had actually become, and helps to explain how Anne died a few days later.
In the end, it is emotional maturation and a sense of understanding about her sister that enables Anne and Margot to become closer. Anne understands differences in personality as not an element of rejection, but actually as a source of community and strength whereby individuals can bond together through such divergences in personality. It is here where I think that a greater sense of understanding emerges and where I feel that Anne and Margot become closer.
This question has already been asked and answered here on eNotes. Here is a link for you: http://www.enotes.com/anne-frank/q-and-a/why-do-you-think-anne-margot-developed-closer-272962