The noun is missing:
It was a warm and cozy _______, and when Martin drew the curtains, she felt safe and protected.
It was a warm and cozy evening (?)
It was a warm and cozy room (?)
It was a warm and cozy atmosphere (?)
Whatever the word that was in the blank space is the noun that 'it' is replacing:
'The evening, it was warm and cozy...'
'The room, it was warm and cozy...'
'The atmosphere, it was warm and cozy...'