Hinduism is the total vedic, tantric, yogic and bhakti approach of Indian saints towards a final goal of immortality. Hinduism has two main concepts:
Nirguna brahman has very spiritualistic prospect. It pertains to "nothingness" that pervades whole cosmos, which is beyond action and is true "self" in everyone.
Saguna brahman is defined as "everythingness". Saguna brahman is a concept that covers day to day actions, the holy/unholy rituals performed by humans are classified as Saguna brahman. These outer rituals are also directed towards the same goal of Nirguna brahman, that is, totality and final immortality. It is believed that all actions are covered with Maya (Maya is the deluding or illusive power of the world; illusion by which the world is seen as separate from the ultimate singular Reality) so is even a purest ritual. However it does not mean there is no bad or good action. While the knowledge of Nirguna brahman is covered in Upanishads (all 108 upanishads), Gita (Avadhuta Gita, Ashtavakra Gita, Bhagavad Gita), Sutra (Narada Bhakti Sutra , Yoga Sutras of Patanjali), and Yoga Vasishta. There are other scriptures and smritis like ManuSmiriti, which cover how the knowledge of brahman reflects on day to day life i.e. Shaguna brahman.
Thread ceremony is a ritual, same as the fasting, wearing turban (head band), not cutting hair and beard as in Sikhs, having shaved head as in Jainism and some sects of Hindus. But time and time again, it has been watched that people often forget final goal of Nirguna brahman and fall prey to rituals. They start to confuse rituals as final goal, where as rituals are not goals by themselves. These rituals on the might provide a direction and reminder to attain the ultimate goal, that too, if done with good intension and knowledge. Therefore saints have always been trying to put forward the real essence of spirituality so did Sri Guru Nanak Dev, his advice that, the ultimate is Nirguna brahman and all rituals no matter how advanced their effects are cannot are under influence of maya. In other words, rituals are not the ultimate goals by themselves, if one attaches itself too much with ritual ceremonies without being aware of their significance, will get diverted and lost in maya and will not be able to achieve the ultimate goal. Guru Nanak Dev was not alone in making such announcements and shunning rituals, other saints also did the same from time to time:
2. Baba Namdev refused to worship idol when he found out Shiva is essence of everything.
3. Tilopa Brahmin saint of bengal highly adored by Tibetan Buddhism also stood against traditional ways of worshiping.
The following story describes the details of Guru Nanak Dev refusing to wear janeu, considered as a sacred thread as it reminded one of its duties. But people at the time were blind faithed so cared more about ceremonies and ritual attached with wearing janeu or janou rather than understanding the hidden message it bring and follow it. When Guru Nanak attained the age of nine years, his father was determined to invest him with the janeu (sacrificial thread of the Hindus). Until a boy is invested with the janeu, he is deemed almost an outcast. When the members of the family and their had gathered, and all the neighbours, secular and religious, had assembled; and all preliminary rites had been duly performed, Hardial, the family priest, proceeded to put the sacred thread around Nanak's neck. The boy caught the thread with his hand, and asked the priest what he was doing, and the advantage of putting on the janeu. The priest explained that the janeu was the basis of the Hindu religion, without which a man would only be a Sudra (there are four great varans or castes of Hinduism: Brahmans, the priestly class; Kshatriyas, the military class; Vaisyas, the trading class; and Sudras, the working and lowest of all classes. There are many subdivisions of these castes ), and by putting it on he would obtain greatness in this life and happiness in the next. On hearing this the young Guru uttered the following:
From Asa ki Var:
The priest explained that the custom of wearing a janeu descended from the Vedic ritual, and that no Hindu could be deemed religious without wearing it. The Brahman then familiarly addressed the Guru, 'Thou art but a child of yesterday, and are we not as wise as thou? Unless thou wear this thread thou shalt be deemed a person without religion.' Guru Nanak replied:
The Brahman priest, on hearing this, became angry, and asked the Guru if everyone else was a fool, and he alone, who had abandoned the customs of his forefathers, was wise. He then asked the Guru to tell him what a proper janeu was. The Guru replied:
The Guru then wound up his instruction on the subject as follows:
Despite Guru Nanak's reluctance to see a benefit for the sacred thread without understanding its true meaning and relevance in living a pure life, Sikhism ironically developed its own equivalent baptism ritual the Amrit Sanskar and mandated the wearing of the Five Ks for the Khalsa at the order of Guru Gobind Singh.
Upanayanam is the saṃskāra or the ceremonial rite in which the young Brahmin boy is invested with the sacred thread and initiated into the Gayatri - the Holiest of all mantras in the legacy of the Rishis. This ceremony is only for boys from the top three social classes. Traditionally, an auspicious time and date is chosen to shave the boy's head completely, leaving only a small tuft in the centre of the scalp, called bodi.
The sacred thread used for the ceremony consists of three strands, joined by a knot known as Brahmagranthi or the knot of Brahma. The three strands symbolise the Hindu trinity - Shiva, Vishnu and Brahma. There are various interpretations of the three strands to represent many of the other triads like Mahasarasvati, Mahalakshmi and Mahakali. Or the three qualities known as sattva, rajas and tamas; past, present and the future; the three states - wakefulness, dream and deep sleep. Some even say that it represents the three dimensions known as heaven (swarga), earth (martyaloka) and netherworld (patala). The twist of the thread must be upwards to ensure that the Sattwaguna or the good quality of truth predominates.
The most important meaning of the three strands is ida, pingala and susumna nadi, through which the kundalini energy manifests as prana and consciousness. Yajno-pavita means 'thread of sacrifice.' That is so called because it symbolises the sacrifice of ego.
The sacred thread was a passport to obtain education. It was a prerequisite for education and also for marriage. Without it, no man could dream of getting a bride for himself. It was considered important because a person with Yajnopavita should have undergone all the oaths associated with wearing it, led a celibate life and completed a major portion of his education. Brahmachari or the bachelor (also, a learner) wore a single sacred thread while the householder or the married person wore two. A person who was married and had lost one or both of his parents wore three.
There are different methods of wearing the Sacred Thread at different occasions. While performing an auspicious ceremony one should be Upaviti, that is, the Sacred Thread should hang from his left shoulder. At the performance of some inauspicious ceremony one should be Prachnaviti, that is, the Sacred Thread should hang from the right shoulder; and at times he is called Niviti when the Sacred Thread is worn round the neck like a garland.
*Note: This information is about the ancient period in India, it is not an indicator of how things are done these days.