According to the Puranas once a fierce battle broke out between Lord Shiva and the demon Shankhchura. Lord Shiva knew it well, that unless the chastity of Vrinda, the wife of Shankhchura, was spoiled, Shankhchura could not be killed.
To defeat Gods ,Shankhchura reached Parvati in the guise of Lord Shiva. But Parvati, knew by her virtues the craftiness of Shankhchura. She at once ended his guise and signalled Lord Krishna (Vishnu) that it was now just to spoil the chastity of Shankhchura's wife, Vrinda, and it will not be a sin .
So, Lord Krishna approached Vrinda in the guise of Shankhchura. Vrinda could not understand the craftiness, and as the Lord in guise form went for outing with her. In ancient time it was like a sin for a woman even to think about other man(In Modern society also if a female is found with unknown man, the questions are raised against the woman). Later on when Vrinda came to know the reality, she cursed Lord Krishna - go and turn into shapeless black stone.
Thus by the curse of a chaste woman Lord Krishna turned into a blackstone. But later on Vrinda felt guilty Thus begging pardon of God, she sought a boon that from that moment onward, God will be worshipped in the same stone form. Also she got a boon that she will also worshipped in the form of tree as Tulsi and Lord said that without your worship, mine worship will not be complete. . God accepted her curse and turned into a black stone, and came to be known as Shaligrama.