Many ancient Shiva Temples could be witnessed in Kashi. one of them is the Budheshwar Temple. The importance of this Temple is mentioned in Kashi Khand.
Legend
According to Kashi Khand, Tara, the wife of Brihaspati, was once the object of Chandra’s (Moon’s) intense affection. Despite the Devas’ warnings, Chandra abducted Tara by force. Despite several requests and petitions, Chandra refused to give up Tara and kept her with him for several days. Rudra Dev was informed of the situation, and he used a tool called a pinak to strike Chandra. Chandra responded in kind. But ultimately Tara was taken away from Chandra and given to Brihaspati.
Brihaspati soon became aware of Tara’s pregnancy. He commanded her to remove the unborn child from her womb. She did so in the garden, but the child was already fully grown. The entire group of Devas learned about the birth of a kid the instant the newborn hit the earth. They all insisted on asking Tara who the child’s father was, but Tara remained mute.
The freshly born kid, who had Buddhi and was exceedingly bright, threatened to curse Tara if she didn’t confess the truth. Tara finally made it known that Chandra was the child’s father. Because of the child’s exceptional degree of intelligence, he was given the name Budha.
Chandra granted Budha’s request for permission to travel to Kashi and offer prayers to Lord Shiva. Budha travelled to Kashi, built a Ling, and began to devote years to worshipping Lord Shiva. Finally, Lord Shiva came in front of him and bestowed his blessings, telling him that the Ling Budha had set up would now be known as Budheshwar, and that anybody who worshipped it would reach the greatest degree of knowledge, which would remain with the devotee regardless of his age. (15th Chapter of Kashi khand).