Sprites are an atmospheric phenomenon associated with lightning during thunderstorms. From Wikipedia:
The sprites are reddish orange in their upper regions, with blue tendrils hanging below, and may be preceded by a reddish halo. They last longer than normal, the lower stratospheric discharges, which typically last a few milliseconds, and are usually triggered by positive lightning discharges between the storm cloud and the ground, although sprites generated by negative earth flashes have also been observed. Frequently, they occur in groups of two or more, and generally span the range of 50 to 90 kilometers (31 to 56 mi), with what appear to be tendrils hanging below and branches reaching up.
Optical images with a high-speed camera of 10,000 frames per second show that the sprites are actually groupings of small de-ionization balls (10-100 m or 33-328 feet) that are launched at an altitude of approximately 80 km (50 mi) and then move down at speeds of up to ten percent of the speed of light, followed a few milliseconds later by a separate set of ionization balls that move upwards. The sprites can move horizontally up to 50 km (31 mi) from the location of the underlying ray, with a time delay that follows a ray that is usually a few milliseconds, but in rare cases can reach up to 100 milliseconds.
To be able to shoot sprites from Earth, special conditions must exist: 150-500 km (93-311 mi) of clear vision to a powerful thunderstorm with positive rays between the cloud and the ground, red-sensitive recording equipment and a sky black without light. .
Basically, it would take the same kind of equipment needed to photograph the lighting, with the additional requirements of a dark night sky and a clear view of a thunderstorm from a very distant position (150-500 km) not below the cloud cover so that you could also see what is happening on the approaching clouds associated with the storm. Climates where the air is normally quite dry also help increase the odds. In more humid places, the mist of water vapor in the air will limit the ability to see, let alone photograph, phenomena so faint from such long distances.
In the image included with the previous question, although it seems that the sprites are closer to the camera than the clouds, they are actually much further away than the clouds and anything visible on the ground to the distant horizon. Sprites occur in the mesosphere which starts at about 50 km altitude and reaches about 90 km.
There are many ways to capture the rays, especially at night. With the right technique and the willingness to take long bursts of moderately long exposures, you can use almost any camera capable of taking continuous exposures of several seconds for indefinite periods of time. However, things like lightning triggers can make it much easier. To capture sprites, having a lightning bolt with high sensitivity to electrical signals generated by lightning that also allows a delay of several milliseconds would help avoid catching the much brighter rays in the same frame with the sprites if the level of illumination is much smaller. It is not hidden beyond the horizon due to the curvature of the Earth.
Here are several questions in Photography SE that talk about how to capture rays:
What technique and camera configuration should I use to capture lightning?
How do I focus properly when I shoot rays?
Photographing rays: white balance
Is this luminous image a natural phenomenon or a digital camera artifact?
How to imagine the thunder when the storm comes.