In the Catholic Church there grew over time specific “devotions” that were assigned to each month of the year. The month of June became associated with the Sacred Heart of Jesus because the feast of the Sacred Heart always falls within that month.
August became known as a month dedicated to the Immaculate Heart of Mary, but currently it is difficult to know why this is the case. There exists no particular feast and the main celebration in August is the Assumption of the Virgin Mary on August 15. The reason why August became associated with the Immaculate Heart of Mary is because of World War II and the devotion of Pope Pius XII to Our Lady of Fatima.