How to merge data?

Using the straightforward way GroupBy

Normal@GroupBy[{{2, 3} -> 1, {1, 5} -> 1, {1, 1} -> 2, {2, 2} -> 2}, Last -> First]

(* {1 -> {{2, 3}, {1, 5}}, 2 -> {{1, 1}, {2, 2}}} *)

Using SequenceCases:

list = {{2, 3} -> 1, {1, 5} -> 1, {1, 1} -> 2, {2, 2} -> 2};
Map[# -> SequenceCases[list, {pat : PatternSequence[_ -> #]} :> First@pat] &, 
Union@list[[All, 2]]]

(* {1 -> {{2, 3}, {1, 5}}, 2 -> {{1, 1}, {2, 2}}} *)

Using pattern in ReplaceRepeated (this will work if at most two entries per index i.e. 1 -> or 2 -> are present)

{{2, 3} -> 1, {1, 5} -> 1, {1, 1} -> 2, {2, 2} -> 2} //. {w___, pat1_ -> x_,
y___, pat2_ -> x_, z___} :> {w, x -> {pat1, pat2} y, z}

(* {1 -> {{2, 3}, {1, 5}}, 2 -> {{1, 1}, {2, 2}}} *)

More general form of ReplaceRepeated (works with more than two entries)

list= {{2, 3} -> 2, {1, 5} -> 1, {1, 1} -> 2, {2, 2} -> 1, {3, 3} -> 2};

list//. {{w___, pat1_ -> x_, y___, pat2_ -> x_, z___} :> {w, x -> {pat1, pat2}, y, z},
{w___, x_ -> {pat1 : {__} ..}, y___, pat2_ -> x_, z___} :> {w, x -> {pat1, pat2}, y, z}}

(* {2 -> {{2, 3}, {1, 1}, {3, 3}}, 1 -> {{1, 5}, {2, 2}}} *)

data = {{2, 3} -> 1, {1, 5} -> 1, {1, 1} -> 2, {2, 2} -> 2};

#[[1, -1]] -> #[[All, 1]] & /@ GatherBy[data, Last]

(*  {1 -> {{2, 3}, {1, 5}}, 2 -> {{1, 1}, {2, 2}}}  *)

a = {{2, 3} -> 1, {1, 5} -> 1, {1, 1} -> 2, {2, 2} -> 2}

Merge[Reverse /@ a, Apply[List]]