A prison in a dream usually reflects a sense of restriction that feels self-imposed as much as external -- a job, a relationship, or a pattern of thinking you can't seem to step outside of. Guilt can also show up disguised as confinement, so it's worth asking what exactly you feel you're being punished for.
Sol and Mars are fiery; the heat of Mars is destructive, that of the Sun answers the vivifying heavenly fire. - William Lilly (1602.-1681.)