This expression means to act dissolutely or foolishly. “Wild oats” refers to a type of grass called Avena fatua that grows so prolifically in Europe it is considered a weed. Therefore, if you were to plant (sow) these wild oats, you’d be acting foolishly and starting something that would be hard to stop later on.
Now you know.