Mr Justice Baker said legislation had put lesbian couples and their children in “exactly the same position as other types of parent and children”.
But he said every case was “fact-specific” and courts could give men who had donated sperm permission to seek contact.
The judge was speaking after giving two sperm donors permission to apply for “contact orders” despite objections from the lesbian parents of their biological children.
Mr Justice Baker said the lawyers involved had argued that the men’s cases – heard in the Family Division of the High Court in London – had “significant public policy implications”.
The judge said he had been told that the men’s cases were the first of their kind to appear in the High Court.
Mr Justice Baker said that in both cases he had considered “it was always part of the plans” that there should be some contact between the sperm donors and their biological children.
But he added that, when considering contact applications, the court would “look very carefully” to ensure that any risk of harm to children was avoided.
He said he had given the two men permission to apply for contact orders but stressed that it did not follow that any “substantive” order for contact would be made.
The judge said “great social changes” had “facilitated the creation of these new types of families”.
But he said lesbian mothers understandably continued to feel vulnerable.
Mr Justice Baker outlined his thoughts in a written judgment published after hearing arguments from lawyers representing sperm donors and lesbian parents.
He said none of the people involved should be identified.
Mr Justice Baker said he had considered the terms of the 2008 Human Fertilisation Embryology Act and policy underpinning reforms contained in that legislation.
“To my mind, the policy underpinning sections of the 2008 Act is simply to put lesbian couples and their children in exactly the same legal position as other types of parent and children,” he said.
“The position of a lesbian couple who have been granted the status of legal parents by the 2008 Act is exactly the same as any other legal parent.
“Having taken those rights into account, however, it is still open to the court, after considering all relevant factors, to grant leave to other persons to apply for (contact) orders.
“In this regard, the position of biological fathers who have been deprived of the status of legal parent by the 2008 Act is the same as any other person.”
He added: “In some cases, the reforms, and the policy underpinning those reforms, will be decisive. Each case is, however, fact-specific.”
Mr Justice Baker said the cases he had considered centred on two men who had been in a relationship for 20 years.
One - referred to by the judge as “S” - had provided sperm for two children born to a woman in a lesbian relationship.
The second - referred to by the judge as “T” - had provided sperm for a child born to a different woman in a separate lesbian relationship.
He outlined disagreements relating to both men and both lesbian couples.
The lesbian partner of the woman who gave birth to S’s children had been upset when T referred to her as “auntie” rather than “mother”, the court heard.
It was alleged that T had complained of “cheating lesbians who have stolen our sperm” and “jumped up and down, banging his chest”.
The lesbian partner of the woman who gave birth to S’s children accepted that she had described T as “a manipulative little shit”, the judge was told.
Mr Justice Baker said the woman who gave birth to S’s children had alleged that S had said he was “equal” to her lesbian partner and had added: “After all, she can’t call herself the father, can she?”
And the woman who gave birth after a sperm donation from T had been worried about T putting “emotional pressure” on her child.
She said she was afraid about the child growing up “confused about the different roles of adults in his life”, the judge was told.