Two types of cacti are arid cacti--those originally from dry, desert locales--and tropical cacti, those from rain forest settings that prefer a humid growing environment. (Christmas, Easter, and Thanksgiving cacti are examples of tropical--also called holiday--cacti.) Whether you want to encourage an arid or a tropical cactus to produce flowers, three factors work together to create the best conditions for flowering: good light, dry soil and cool nights.
Place a cactus near a bright sunny window. For many varieties of actively-growing cacti, 14 to 16 hours of light per day is ideal. Supplement natural light as needed with natural white fluorescent tubes hung 6 to 12 inches above a cactus. But during winter months, forgo the supplemental lighting.
Make sure tropical cacti are in the dark 13 hours a day for six weeks to encourage flowering. To counteract artificial lighting conditions, place plants in a dark room, set a box over the plant, or drape dark cloth over it. As soon as buds appear, place your tropical cactus where you want to display it and don't disturb it. Sudden changes in temperature, humidity, or direction of sunlight could result in dropped buds.
In the dormant period, water cacti only enough to prevent shrinking and withering. Allow water to flow through the drain holes each time and dump out excess water. In the spring, begin watering more frequently, but still allow the soil to dry out between each watering. During active growth, water when the top half inch of potting mix feels dry to the touch. Avoid frequent shallow watering as this may lead to distorted growth.
Cool periods during fall and winter, a cactus's natural dormant period, will encourage flowering the following spring. Keep arid cacti between 45 and 55 degrees during dormancy.
For holiday cacti you can encourage bud formation by providing six weeks of temperatures between 45 and 55 degrees prior to flowering.