A product owner writes user stories when there's a need to communicate the user's needs to the development team. This often happens at the start of a project or when there are changes in user requirements. The circumstances could include gathering feedback from users, conducting market research, or collaborating with stakeholders to identify user pain points and goals.
The product owner pens down user stories when they aim to provide clear and actionable guidelines for the development process. It could be before a sprint begins, or when there's a need to prioritize and organize tasks based on user priorities. Sometimes, it's also done to ensure that the final product meets the user's expectations and provides value.