Do you mean that your cell didn't have sunlight or that you literally never went outside? I was watching a documentary on ADX Florence, which is known for its maximum-security isolation, and prisoners were allowed one hour outside per day.
I was held in cells without windows for five years. The other five the cells had windows but were so dirty that practically no sunlight entered. Never went outside. Maybe a total of 10 hours outside in 10 years. The first five years in a facility where they didn't design any outside into it because it was built in the middle of a downtown area and there wasn't space. The other five in a facility that had large outside areas but no staff to organize corralling a whole cellblock of inmates, getting them through the corridors of the buildings to the outside, monitoring them so they didn't escape and then getting them back. That requires a lot of staff, and most jails and prisons are vastly understaffed.