The `ColorFunction` of a `SphericalPlot3D` has five arguments, the first three being the $x$, $y$ , $z$ coodinates in $\mathbb{R}^3$. The _last two_ are the actual parameterization parameters of the surface.

`#` (`Slot`) and `&` (`Function`) together allow to define anonymous function. `#4` and `#5` refer to the fourth and fifth argument. Here is (essentially) equivalent rewrite with `Function` in long form:

    SphericalPlot3D[1, {θ, 0, π}, {ϕ, 0, 2 π}, 
     ColorFunction -> 
      Function[
       {x, y, z, u, v}, 
       ColorData["Rainbow"][Re[SphericalHarmonicY[5, 2, u, v]]]
       ], 
     ColorFunctionScaling -> False
     ]

Compare this also to the following:

    g = GraphicsRow[   
     Table[
      SphericalPlot3D[1, {θ, 0, π}, {ϕ, 0, 2 π},
      PlotPoints -> 100,
      ColorFunction -> f
      ],    
      {f,
        {
         Function[{x, y, z, u, v}, ColorData["Rainbow"][(1 + Sin[5 Pi x])/2]],
         Function[{x, y, z, u, v}, ColorData["Rainbow"][(1 + Sin[5 Pi y])/2]],
         Function[{x, y, z, u, v}, ColorData["Rainbow"][(1 + Sin[5 Pi z])/2]],
         Function[{x, y, z, u, v}, ColorData["Rainbow"][(1 + Sin[5 Pi u])/2]],
         Function[{x, y, z, u, v}, ColorData["Rainbow"][(1 + Sin[5 Pi v])/2]]
         }
        }    
        ],   
      ImageSize -> Full   
      ]

[![enter image description here][1]][1]


  [1]: https://i.stack.imgur.com/PywUx.png