Eclipse is a special celestial event which takes place either on a full moon (lunar) or a new moon day (solar).
As per the traditional belief, good deeds done during this time would give manifold fruits. Hence it is considered as very potent time for the sadhana.
As per astronomy, Sun, Moon, and Earth are in a straight direction during the eclipse. Either Sun's view is blocked by the moon or moon is not seen due to shadow of Earth. In both cases they are in an alignment.
Now how does these planets being in the straight line have any impact on us?
As per the shastrAs,
Moon signifies the mind,
चन्द्रमा मनसो जातश्चक्षोः सूर्यो अजायत । श्रोत्राद्वायुश्च प्राणश्च मुखादग्निरजायत ।। 12 (purusha suktam)
the Sun signifies Soul/AtmA, (cosmic consciousness)
सूर्य आत्मा जगत्स्तथुषश्च - ऋग्वेद
And the earth signifies physical body.
Hence during the eclipse tume, our mind, body, and soul are more in an alignment with each other than the normal time.
The idA nAdi signifies the moon, the pingalA nAdi signifies the Sun and when both are in alignment, there is high chances of the central nAdi ShushumnA (the passage of kundalini shakti) to get activated.
When sushumna is active, the person has a better ability to dwell within and contemplate or meditate.
The Varaha Upanishad (13-16 cc. CE) further describes it as follows:
"The nāḍis penetrate the body from the soles of the feet to the
crown of the head. In them is prāṇa, the breath of life and in that
life abides Ātman, which is the abode of Shakti, creatrix of
the animate and inanimate worlds." (VU 54/5)
The medieval Sat-Cakra-Nirupana (1520s), one of the later and more
fully developed classical texts on nadis and chakras, refers to these
three main nadis by the names Sasi, Mihira, and Susumna.
In the space outside the Meru, the right apart from the body placed on
the left and the right, are the two Nadis, Sasi (idA) and Mihira (pingala). The Nadi
Susumna, whose substance is the threefold Gunas, is in the middle. She
is the form of Moon, Sun, and Fire even water also; Her body, a string
of blooming Dhatura flowers, extends from the middle of the Kanda to
the Head, and the Vajra inside Her extends, shining, from the Medhra
to the Head.
Hence this time is a precious time when there are higher chances for shuhumna naadi to be active. One can use this time to advance in spirituality.