Cacti usually need direct or filtered sunlight to perform photosynthesis. Natural light can be supplemented by aftifical light such as flourescent lighting. Cacti have adapeted to survive in solid clay and pure sand, with limited nutrients. But to grow more heathier cacti, they should be grown in a soil or potting mixture which provides free-draining and retains moisture. Always use a gritty mixture to harbor pests and diseases, and to ensure correct drainage.
Most cacti perfer a slightly acid soil.
To make soil more acid, add plenty of peat.