The volume of a cylinder of height h and radius r is [itex]V= \pi r^2h[/itex].
To solve that for the radius, divide both sides by [itex]\pi h[/itex] and take the square root:
[tex]r= \sqrt{\frac{V}{\pi h}[/itex]

The diameter is twice the radius, of course, so
[tex]d= 2\sqrt{\frac{V}{\pi h}= \sqrt{4V}{\pi h}[/itex]
because [itex]\sqrt{4}= 2[/itex].