Well, depending on your definition of 'worshiping the sun', some still do.
For example, in Hinduism, the god Surya is the sun god and is an important deity in traditional Hindu astrology. He is worshiped as the supreme deity by the Saura sect (https://en.wikipedia.org/wiki/Saura_(Hinduism)) of Hindus - tough admittedly they're a smaller sect than other major Hindu sects. The Smrata Hindu tradition (https://en.wikipedia.org/wiki/Smarta_Tradition) also worships Surya as one of its five principle deities, along with Shiva, Vishnu, Devi, and Ganesha.
In Japanese Shinto, the sun goddess Amaterasu is an important goddess, considered the ancestor of the Yamato clan, and thus the ancestor of all the Japanese emperors. Ise Jingu shrine (https://en.wikipedia.org/wiki/Ise_Grand_Shrine) is arguably the most important Japanese shrine, and is dedicated to this sun goddess. Worship at this shrine has been a key part of Shinto for hundreds of years.
Other major religions (Christianity, Judaism, Islam etc.) don't worship the sun because it's considered to be a part of God's creation, rather than God himself. This began with the Torah, as in Genesis 1:14, God famously creates the sun and moon (called 'lights in the firmament of heaven' in the text).
If I may ask another question (if not I might put it as a seperate thread): Why did the ancient Egyptians worship the sun to such an extent? It seems that every Egyptian deity who was considered head of the pantheon in any region or time took on aspects of a sun god.
I mean, I can understand that Egyptians would worship the Nile (as they did), because it gives the country life. But sunshine/warmth is a thing of which there always was an abundance in Egypt. Why would you worship a thing of which there is so much that it actually becomes a danger (draughts, fire, heatstroke, etc.) I could get it if say the German tribes in the freezing north worshipped the sun, but why somebody who no doubt would have been better off with a bit less sun?