The phenomenon you're referring to is commonly known as "light pillars." Light pillars are vertical columns of light that appear to extend upwards into the sky. They are caused by the reflection and refraction of light by ice crystals in the atmosphere, typically occurring in cold weather conditions.
Here's how light pillars form:
Weather conditions: Light pillars occur on cold, clear nights when there are high-altitude ice crystals present in the atmosphere. These ice crystals can be found in the form of thin, flat hexagonal plates or elongated columns.
Artificial or natural light sources: Light pillars are most commonly seen around artificial light sources, such as streetlights, buildings, or car headlights. The light from these sources interacts with the ice crystals in the air.
Reflection and refraction: When light encounters the flat ice crystals, it undergoes both reflection and refraction. The crystals act like tiny mirrors, reflecting the light horizontally. The refraction occurs as the light passes through the flat faces of the ice crystals, bending or deflecting the light.
Vertical alignment: The reflected and refracted light beams align vertically, forming a pillar-like shape extending upwards into the sky. The columns of light can be of various colors, depending on the source of light and the properties of the ice crystals.
Light pillars are an atmospheric optical phenomenon and can create a beautiful and ethereal spectacle, particularly when observed in urban areas with numerous light sources.