Basically any adult can officiate a marriage, then its just a matter of filing the right paperwork with the county clerk - that is what constitutes the legal/civil marriage in the US.
There was the famous case of the clerk in a county in Kentucky refusing to certify same-sex marriages a few years back.
There is also something called "common law" marriages where the state considers you married even if you didn't file the proper paperwork, but were co-habitating and especially if you had children. But this is a dying practice and only recognized by a few states / territories (ironically Washington D.C. is one of them ...)
Devils advocate here, but what excuse could there possibly be to allow a 12 year old to get married?
the rare younger cases are mostly for the reason you might think, leaning on the parents wanting it. You'd hope the judge would say no but there's religious communities that still support it.
Parents want their 12 year old to marry an adult? We don't have this in Europe, religious or not.