I think it depends on the state too. I am in California (Bay Area) and we don't need to show any marriage certificate in the hospital at all. We just fill in the form with daddy and mommy's information and put down what the baby's name in the form so they will use that name in the birth cert. I think you can put whatever name you want for the baby but I guess if you plan to have some kind of immigration process and the baby cert only have the mom's name only, it may cause a bit more steps/reasons to do/explain.
e.g. If the bb's dad is US citizen, and bb's birth cert only have mommy's name... when mommy want to apply for US immigration (I-485 etc), normally you can show the bb birth cert as a good proof for real marriage... if the bb's birth cert only have mommy's name, you may have more explanation to do. It's not impossible but just may cause more works to do. So it depends on the situation.
P.S. I have a friend who gave birth to her daughter. Her baby use the baby's dad's last name on the birth cert but the mom and dad are not married. There is no problem at all. There are so many single mom or couples have babies without getting marry out there...