When a court can order that a child spend time with a grandparent, step-parent or other non-parent over a parent's objection - the constitutional limit set by the Supreme Court, the circumstances in which state statutes allow a petition, the special weight a fit parent's decision receives, and what a petitioner must prove.
Every state has a statute allowing certain non-parents - grandparents in all of them, and in many also step-parents, siblings, other relatives or any person with a parent-like relationship - to petition a court for visitation with a child. The statutes vary widely, but all of them now operate under a constitutional ceiling: a fit parent has a fundamental right to direct the upbringing of their child, including who the child sees, and a court may not override that decision merely because a judge thinks more contact would be good for the child. A parent's decision to limit or end contact with a grandparent is presumed to be in the child's interest, and the petitioner must overcome that presumption with something more than a disagreement about what would be good for the child.
States have responded in different ways. Most limit who may petition and when: typically only after a parent has died, the parents have divorced or separated, the child was born outside marriage, or the child has lived with the petitioner for a substantial period, so that a grandparent cannot sue an intact married family that has simply chosen to cut off contact. Most require the petitioner to prove that the parent's refusal would harm the child, or at least to rebut the presumption in the parent's favour by clear and convincing evidence, before the court reaches the child's best interests. Many require an existing relationship between the petitioner and the child. A few states' broader statutes have been struck down or narrowed by their own courts as inconsistent with the parental right, and a petition filed under a statute in that condition may fail on constitutional grounds alone.
A visitation order for a non-parent is an order for time, not custody: it does not give the grandparent decision-making authority, and it can be modified or ended on a change of circumstances, including a subsequent adoption of the child by a step-parent (which in many states terminates grandparent rights derived from the adopted-out parent). A person who has actually raised the child may have a different and stronger claim under the state's de facto parent, psychological parent or in loco parentis doctrine, which in some states supports custody rather than mere visitation. Costs and fees are usually borne by each party, and some statutes allow the court to award the parent's fees against a petitioner who sues without a reasonable basis.
A grandparent who has lost contact should have a lawyer assess, before filing, whether the state's statute even allows a petition on the facts and what must be proved, because a petition that fails the threshold may be dismissed and may inflame the estrangement it was meant to cure; mediation is frequently the better first step. A parent served with a petition should not assume the court will defer to them automatically - the presumption has to be asserted and supported. Where the grandparent has been the child's actual caregiver, the claim may be for custody or guardianship rather than visitation, and that is a different case.
Choose your state. Each link opens the directory page for the city in that state with the most currently published law firms in this practice area; a +n beside the city is how many other cities in the state also have one. The list is generated when this page loads, so a state whose listings have lapsed drops out rather than becoming a dead link.