Aditya Hrudayam is a Hindu hymn dedicated to Sun God Lord Surya Naryana. Aditya means Sun. Hrudaya means God. It is one of the most powerful and sacred hymn on Sun God. The hymn composed by Sage Agastya contains a set of 31 shlokas. They are a part of Yuddha Kanda of Valmiki Ramayana.
Background
It starts at the beginning of the battle between Lord Rama and Ravana. Having fought a long war with Ravana and his warriors Lord Rama was exhausted, fatigued, and worried. It was impossible for him to defeat Ravana. Watching Lord Rama depleted of physical energy and mental strength, Sage Agastya approaches Rama, describes the glory and prowess of Lord Surya and reminds him His blessings are critical to achieve victory. Through these shlokas Sage Agastya reveals to Lord Rama (and the rest of us) the way to do Surya upasana (method to worship Sun god) and the secret of success. After learning this hymn from Sage Agastya Lord Rama chants Aditya Hrudayam. Invocated by Rama Lord Surya appears and blesses Lord Rama that his victory over the demon king is certain and asks him to continue the battle. Refreshed with confidence and strength, Lord Rama re-enters the battlefield eager to defeat Ravana.
In essence, it can be interpreted thus. When faced with difficult situations one loses hope, lacks motivation, and fears defeat. The mind is depressed and turns negative. Sun god is Pratyaksha devata (one who can be seen) and the one who watches over us at all times. At such times praying to Him helps one regain the lost confidence and strength required to face the situation.
Interpreted figuratively, Rama represents our soul and Ravana represents the ego and all the negativities that reside in us. Many times in our lives the soul engages itself in a constant battle with the mind to overcome these negative forces. At the appropriate time a spiritual guru appears and guides the soul to right path. The re-invigorated soul can focus back on his/her goals and continue the journey.
It is repeatedly re-iterated in the shloka that Lord Surya is (intellectually) luminous and the dispeller of darkness (ignorance) in the cosmos (and inside our minds).