They are two pairs of wavy green seaweed blades. Mindy puts them above SpongeBob and Patrick's lips so that they look like facial hair.
Role in series
The SpongeBob SquarePants Movie
When SpongeBob and Patrick keep whining over how they are babies, Mindy decides to make them "men" by putting seaweed mustaches on them. When they realize they have mustaches, SpongeBob and Patrick feel empowered and jump into the trench.
They think that they are invincible now that they have manly mustaches, so they sing a song about becoming real men. However, Dennis appears on the other side and rips off their mustaches and tells them that they were not real and that he thought they still had salad stuck to their lips from lunchtime. Dennis then shows the pair shat a real mustache looks like by forcibly growing on his face through grunting.