Quoted By:
Spores shaken off by the female Whimsicott may land on cotton plants, causing the spore to go deep inside the plant and use it as a womb of a sorts so it can grow. When the cotton plant grows the Cottonee will slowly wiggle its way out of the plant, making it look like something is slowly pushing the cotton out of the plant from inside.
Eventually a tiny Cottonee pops out, and if it's lucky and stays away from predators, it will eventually grow larger due to the sunlight making contact with the leaves on it's sides, which provide it with synthesis so it can grow.
It's usually a race to soak up the most sunlight so they can become strong enough to protect themselves. Luckily sunlight isn't that hard to come by, so as long as they remain hidden, they'll usually make it.
Some farmers also create hidden cotton fields to help them survive. Whimsicott are almost sure to choose these over the others if there's one nearby. Some people have been worried about overpopulation of Cottonee, but since they only eat sunlight and rain, they don't require that many resources and having plenty of them around doesn't damage the ecosystem at all.
Source: my ass