The One Ring could rule all the other rings. So why didn't Galadriel take off her ring? It seems so dangerous to wear that ring. Before The Lord of the Rings: The Fellowship of the Ring, the location of the One Ring wasn't known. So if by any chance Sauron got hold of the ring then wouldn't they go under his control? So why didn't Galadriel take off her ring?
The chapter "Of the Rings of Power and the Third Age" has the answers.
When they perceived the power of the One Ring, the Elves hid away the Three so that Sauron could not use his power against them.
But the Elves were not so lightly to be caught. As soon as Sauron set the One Ring upon his finger they were aware of him; and they knew him, and perceived that he would be master of them, and of any that they wrought. Then in anger and fear they took off their rings. But he, finding that he was betrayed and that the Elves were not deceived, was filled with wrath; and he came against them with open war, demanding that all the rings should be delivered to him, since the Elven-smiths could not have attained to their making without his lore and counsel. But the Elves fled from him; and three of their rings they saved, and bore them away, and hid them.
Now these were the Three that had last been made, and they possessed the greatest powers. Narya, Nenya, and Vilya, they were named, the Rings of Fire, and of Water, and of Air, set with ruby and adamant and sapphire; and of all the Elven-rings Sauron most desired to possess them, for those who had them in their keeping could ward off the decays of time and postpone the weariness of the world. But Sauron could not discover them, for they were given into the hands of the Wise, who concealed them and never again used them openly while Sauron kept the Ruling Ring. Therefore the Three remained unsullied, for they were forged by Celebrimbor alone, and the hand of Sauron had never touched them; yet they also were subject to the One.
The bold part (emphasis mine) is the key point: they were never used openly while Sauron kept the Ruling Ring. At the time when the LotR story is set, he didn't possess the One, and hadn't possessed it for hundreds of years.
Later, when Sauron did not have the One to use against them, they used the Three as forces of good.
Of the Three Rings that the Elves had preserved unsullied no open word was ever spoken among the Wise, and few even of the Eldar knew where they were bestowed. Yet after the fall of Sauron their power was ever at work, and where they abode there mirth also dwelt and all things were unstained by the griefs of time. Therefore ere the Third Age was ended the Elves perceived that the Ring of Sapphire was with Elrond, in the fair valley of Rivendell, upon whose house the stars of heaven most brightly shone; whereas the Ring of Adamant was in the Land of Lуrien where dwelt the Lady Galadriel. A queen she was of the woodland Elves, the wife of Celeborn of Doriath, yet she herself was of the Noldor and remembered the Day before days in Valinor, and she was the mightiest and fairest of all the Elves that remained in Middle-earth. But the Red Ring remained hidden until the end, and none save Elrond and Galadriel and Círdan knew to whom it had been committed.
See also this answer.
In the Second Age the Elven Rings were unworn, as soon as Sauron put the One Ring on his finger the Elves realized what was happening and took theirs off. Leading to the War of the Elves and Sauron.
After Sauron lost the Ring there was no danger in using the Elven Rings. Unlike the Seven and Nine, Sauron was not involved with their making (beyond the indirect connection of Celebrimbor using the techniques Sauron taught the Elves for ring making). Galadriel, like the bearers of the other two rings, wore her ring throughout the Third Age.
You're missing one very important part about Sauron regaining the One: "...all that has been wrought with [the three] will be laid bare..." Even if no one is wearing the three elven rings when Sauron regains the One, he will be able to basically wipe away Rivendell and Lothlorien.
Not wearing the Three would not prevent his ruling Middle Earth if Sauron gets the One, and wearing the Three can help prevent him from getting it. So all the wearers of the elven rings have nothing at all to lose by wearing them, and still much to gain or preserve.