The worst thing you can do to a cactus or succulent is deprive it of sunlight. Without sunlight they won’t grow and thrive, and they certainly won’t bloom. Well, some might, but not as well. Cactus will become misshapen in their desperate attempt to grow toward sunlight even if they don’t die from lack thereof. When succulents reach for sunlight, they will grow leggy, meaning that the space between the sets of leaves on the stems will be too far apart, which makes them look misshapen and not pretty. The truth is cactus and succulents love being outdoors, which means you may not get to see and enjoy them as much, but if you want them to do well, put them outside during warm weather.
I will also tell you that if you bring your blooming cactus in so you can admire the beautiful flower, it will not stay open as long, as it is the light that triggers the bloom. Granted, some will bloom indoors, but that doesn’t mean they like it.
I was told by a nurseryman that for a plant to get any benefit from a sunny window or other light source, the plant must be within six feet of that light. So you might want to keep that in mind when looking for the perfect place for your cactus or succulent. If you really want one indoors for a special occasion and it can’t be close to the light, bring it inside for a day or two and then take it back out. If you have more than one, rotate them inside and that way none of them will suffer.