Story points are used in agile project management to provide a relative estimation of the complexity, effort, and size of tasks. During sprint planning, teams assign story points to backlog items based on their complexity through discussion and consensus. Story points help teams prioritize tasks, plan sprints effectively, and generate sprint reports that provide insights into productivity and project progress. While alternatives like time estimates and task counts exist, story points are preferred as they account for inherent uncertainties and complexities in software development.