You have the right to petition the court( where the children live) for visitation. But if the parents are living together, meaning not separated and are a nuclear family, then you will loose on your petition- sorry.
Here is the New Hampshire statute on this issue ( my emphasis) :
461-A:13 Grandparents' Visitation Rights. –
I. Grandparents, whether adoptive or natural, may petition the court for reasonable rights of visitation with the minor child as provided in paragraph III. The provisions of this section shall not apply in cases where access by the grandparent or grandparents to the minor child has been restricted for any reason prior to or contemporaneous with the divorce, death, relinquishment or termination of parental rights, or other cause of the absence of a nuclear family.
II. The court shall consider the following criteria in making an order relative to a grandparent's visitation rights to the minor child:
(a) Whether such visitation would be in the best interest of the child.
(b) Whether such visitation would interfere with any parent-child relationship or with a parent's authority over the child.
(c) The nature of the relationship between the grandparent and the minor child, including but not limited to, the frequency of contact, and whether the child has lived with the grandparent and length of time of such residence, and when there is no reasonable cause to believe that the child's physical and emotional health would be endangered by such visitation or lack of it.
(d) The nature of the relationship between the grandparent and the parent of the minor child, including friction between the grandparent and the parent, and the effect such friction would have on the child.
(e) The circumstances which resulted in the absence of a nuclear family, whether divorce, death, relinquishment or termination of parental rights, or other cause.
(f) The recommendation regarding visitation made by any guardian ad litem appointed for the child pursuant to RSA 461-A:16.
(g) Any preference or wishes expressed by the child.
(h) Any such other factors as the court may find appropriate or relevant to the petition for visitation.
III. The petition for visitation shall be entered in the court which has jurisdiction over the divorce, legal separation, or a proceeding brought under this chapter. In the case of death of a parent, stepparent adoption, or unwed parents, subject to paragraph IV, the petition shall be entered in the court having jurisdiction to hear divorce cases from the town or city where the child resides.
IV. If the parent of the minor child is unwed, then any grandparent filing a petition under this section shall attach with the petition proof of legitimation by the parent pursuant to RSA 460:29 or establishment of paternity pursuant to RSA 168-A.
V. Upon the motion of any original party, the court may modify or terminate any order made pursuant to this section to reflect changed circumstances of the parties involved.
VI. Nothing contained in this section shall be construed to affect the rights of a child or natural parent or guardian under RSA 463 or adoptive parent under RSA 170-B:20.
Source. 2005, 273:1, eff. Oct. 1, 2005.