Indeed, aṣ-Ṣafā and al-Marwah are among the symbols1 of Allāh. So whoever makes ḥajj [pilgrimage] to the House or performs ʿumrah - there is no blame upon him for walking between them.2 And whoever volunteers good - then indeed, Allāh is Appreciative3 and Knowing.
Translation: Saheeh International (English)
1 Places designated for the rites of ḥajj and ʿumrah.
2 Some believers had previously feared that this might be a pagan practice, so Allāh confirms that saʿī is among the rites of His religion.
The two mountains known as Ṣafā and Marwah, near to the Kaaba, are landmarks of the clear sacred law. Whoever goes to the Kaaba to perform the acts of Hajj or Umrah, there is no fault in them walking between the two mountains. By clarifying that there was no fault in this action, Allah was comforting those Muslims who avoided walking between the mountains because they feared it was an unacceptable action from the time of ignorance before Islam; but Allah made it clear that the walking between the mountains was an acceptable act of Hajj. Whoever sincerely does what is recommended of voluntary sacred acts, Allah acknowledges them and rewards them. He is aware of who does good and is worthy of being rewarded.