TL;DR
Effort and value are not correlated. Story points measure the former.
Effort vs. Value
The effort needed to implement a story may not have a direct relationship to its perceived value. A feature that unlocks a ton of value but is super easy to implement might only be a 1-point story, while a 13-point story that requires days of effort by the whole team might be of limited customer or business value.
A core feature of story points is that it allows the team and the Product Owner to determine if the value of a story is worth the effort, and if the story can fit within n iterations. If story points measured value, you wouldn't be able to use the proxy metric of effort to compare stories by project run-time, cost, or scheduling, or to estimate a time-based release plan based on team capacity.
Measuring value is certainly important, but it isn't part of the definition of a story point. In most agile systems, the value of a story (to the project; not necessarily to the business or its customers) is expressed through its ordinal position in the Product Backlog, or as an ancillary metric tracked within the process.
Story Points Measure Effort, Not Value
Story points should always be a measure of relative effort, not of value. However, practitioners can and do disagree on how much issues such as complexity, difficulty, or risk should impact those estimates.
In "What Are Story Points?", Mike Cohn says:
Because story points represent the effort to develop a story, a team’s estimate must include everything that can affect the effort. That could include:
- The amount of work to do
- The complexity of the work
- Any risk or uncertainty in doing the work
When estimating with story points, be sure to consider each of these factors. Let’s see how each impacts the effort estimate given by story points.
Importance of Consistency in Estimation
I consider Cohn's explanation above to be fairly dispositive, and in my professional experience the combinatorial approach to effort-based estimation he describes generally results in the most consistent and reliable metrics over time. However, almost any approach to estimation can work, provided that the estimation criteria are well understood by both the team and the organization, and given that the same methodology is consistently applied throughout the life cycle of the project.