What affects stain quality?

Wood type

Moisture content

Previous treatment

Weather

Should you stain on wet wood?