If any twice born student is not doing Sandhyavandanam for many days, then only he realized the importance of Sandhyavandanam, how can he get rid of his sins for not doing Sandhyavandanam for many long years? What is the atone ritual for not doing Sandhyavandanam regularly?
For many years is what you have mentioned. IMHO, in such cases, it will require another initiation but i am not quite sure on that.
The Manu Smriti says that such persons shall be treated just like Sudras (or non-initiates) are .
Na tishtathi tu yah purvA na upAste yash cha pashchimam |
Sa sudravad vahishkAryah sarvasmAd dvijakarmanah ||
But he who does not (worship) standing in the morning, nor sitting in the evening, shall be excluded, just like a Sudra, from all the duties and rights of an Aryan.
Manu Smriti 2.103
Verses of similar nature are found elsewhere too:
That Brahmana in particular, who does not perform his Sandhya adorations, in the evening, morning and the noon, becomes in his lifetime like a S'udra. After his death, he is born as a dog. (18)
One, who does not perform the Sandhya-adorations, is always impure, and is unworthy of all religious rites. The fruit, of any religious rite that he may perform, goes not to him. (19)
Daksha Smriti Chapter 2 Verses.
But, if it is a matter of failure for just a day, then remedies are are there and they are quite easy to perform too:
He, who out of carelessness fails to perform the Sandhya once, either in the morning or in the evening, should, with a concentrated mind, recite, after bathing, the Gayatri for a thousand times. (63)
Some hard-to-perform remedies (possibly for relatively more prolonged failures) are however prescribed in other Smritis like:
In consequence of wilfully [neglecting the Sandhya, the foremost of the twice-born should perform the distressing penance [of Prajapatya for full one year, and should perform the Chandrayana, [if he does so] for livelihood. [And] by making a gift of kine, [he is] purged of [his sins]. (67)
If he does so, prompted by agnosticism, a twice-born person should perform the Prajapatya. By performing the Taptakrichha, one is purged off of [the sin of] acting against the Deities and preceptors. (68)
Usana Smriti's Chapter 9 verses.