The lateral edge of a regular rectangular pyramid is $a$ cm long.The lateral edge makes an angle $\alpha$ with the plane of the base.What is the value of $\alpha$ for which the volume of the regular rectangular pyramid is greatest?
Since the volume of the rectangular pyramid is $V=\frac{lbh}{3}$,where $l$ is
the length of the base of the pyramid,$b=$width of the base of the pyramid,
$h=$ height of the pyramid.
and $\sin \alpha=\frac{h}{a}$,where $a$ is the lateral edge(as given in the question.)$\Rightarrow h=a\sin\alpha$
So $V=\frac{l\times b \times a\times\sin\alpha}{3}$
What should i do to maximize the volume?

In a constrained problem where surface area or some other item is an implied constraint , volume of a cuboid or regular rectangular pyramid that has a constant multiplier, a product of 3 numbers is maximum when they are all equal $= b= l= h $, it can be proved separately.
EDIT 1/2
When all three dimensions are equal,
$$ \tan \alpha = \dfrac{2h}{ \sqrt{l^2+b^2}} = \sqrt2. $$