Is the orientation of an expansion tank with respect to the pipe important?
In general, the tank can be installed vertically above or below the plumbing, or horizontally.  Typically, the tank is only required to be supported when installed in the horizontal position.  Most smaller tanks are designed to be supported by the plumbing, when installed in the vertical orientation. The most common recommendation seems to be, to install the tank vertically below the plumbing.
You'll want to check the manufacturer's installation instructions, to determine how to properly install the specific tank you're using.
Here's example installation instructions, from a Watts® Potable Hot Water Expansion Tank.


5. Install the expansion tank in the system (refer to Figure 1).
a. The weight of the expansion tank filled with water is supported by
the system piping. Therefore, it is important that, where appropriate,
the piping has suitable bracing (strapping, hanger, brackets).
b. The expansion tank may be installed vertically (preferred method)
or horizontally. Caution: The tank must be properly supported
in horizontal applications.
c. This expansion tank, as all expansion tanks, may eventually leak.
Do not install without adequate drainage provisions.