That part of the shape comes down to a couple of factors.
First of all, you want valves to be light. Second, the outside of the valve's head forms part of the combustion chamber.
The shape of the combustion chamber influences a couple of things. A hemispherical chamber tends to help "breathing"--the ability to get fuel-air mixture into the chamber and get exhaust out of the chamber.
Another common shape is a wedge. A wedge shape helps "swirl" the fuel/air mixture around in the chamber during the compression stroke, to ensure the fuel and air are evenly mixed, so it burns more evenly and completely.
The former tends to improve performance in terms of power per unit of displacement, while the latter tends to improve performance more in terms of power extracted per unit of fuel consumed.
A mushroom shaped head is typically (as shown above) used with a hollow valve. In this case, the valve is typically filled with sodium. Sodium is a metal with a very low melting point, so in normal operation, the valve is filled with liquid sodium. Liquid sodium is a very good heat conductor, so it conducts heat from the head of the valve to the stem, which is surrounded by oil and a valve guide, which help conduct the heat away. The mushroom head makes it relatively easy to maintain a uniform thickness of steel between the outside of the valve and the sodium inside, so the heat is conducted away relatively evenly--extreme heat gradients can lead to failure (e.g., the valve cracking). The valve's movement helps circulate the liquid sodium around to help heat circulation, and keep the temperature of the outside of the valve relatively uniform.
Another factor favoring a tulip shape (or similar) is reducing valve float. The heavier the valve, the stronger of a spring you need to ensure that the valve closes as soon as the cam lets it. If the valve stays open (floats) it can reduce power, or in more extreme cases the valve can contact the piston, which will normally lead to engine failure requiring a full inspection and rebuild at a minimum (and quite possibly requiring complete replacement). Stronger valve springs can help too, but they put more wear and tear on the drive train (e.g., timing belt) and "steal" more power from the engine to turn the cam.