Here is one more approach - for calculating the range of each point I am using a one-dimensional VoronoiMesh[]
:
points = SortBy[points, First];
xvals = List /@ points[[All, 1]];
vorm = VoronoiMesh[xvals];
ranges = MeshPrimitives[vorm, 1] /. Line -> Flatten;
func[\[FormalX]_] = Piecewise@MapThread[{#2[[2]], #1[[1]] < \[FormalX] < #1[[2]]} &, {ranges, points}]
The result is somewhat different from that of Gianluca - it depends on what you need.