이다 means to be. The past form of 이다 is 이었어요/였어요.

If 이다 ends on a vowel: 였다.
사고 나기 전에 제 여자친구는 간호사였어요

If 이다 ends on a consonant: 이었다.
옛날이었어요

‘-이었어요/였어요’ attaches after a noun. ‘이었어요’ is a combination of ‘이다’ and ‘-었-‘ and ‘-어요.’ ‘이었’ is shortened to ‘였.’ So it becomes ‘-였어요.’ So this expression is used after a noun to talk about things in the past.
Let’s find out more by looking at the examples.
어제는 일요일이었어요. Yesterday was Sunday.
‘일요일이었어요’ is a combination of the noun ‘일요일’ and ‘이었어요.’

When talking about past events, use ‘이었어요’ after ‘noun’. ‘일요일이었어요’

저는 가수였어요. 지금은 학생이에요. I was a singer. I am a student now.
‘가수였어요’ is a combination of the noun ‘가수’ and ‘였어요.’
I am a student now. I was a singer in the past.
When talking about past events, use ‘이었어요’ after ‘noun’.
‘가수였어요’

When the preceding noun has the final consonant, ‘-이었어요’ is used. For example, when you look at ‘학생’, it has a final consonant so ‘-이었어요’ is used after that. So you can say ‘학생이었어요.’

도서관
There is the final consonant. ‘-이었어요’ is used after that. So you can say ‘도서관이었어요.’

when a former noun does not have the final consonant, ‘-였어요’ is used.
When you look at the noun ‘가수’, there is no final consonant. Then ‘-였어요’ is used. So you can say ‘가수였어요.’
When you look at ‘기숙사’, there is no final consonant. Then ‘-였어요’ is used. So you can say ‘기숙사였어요.’

이다 past tense summary

If 이다 ends on a vowel: 였다.
사고 나기 전에 제 여자친구는 간호사였어요

If 이다 ends on a consonant: 이었다.
옛날이었어요


when the preceding noun has the final consonant, ‘-이였어요’ is used.
So ‘학생’ becomes ‘학생이었어요.’

when the former noun does not have the final consonant, ‘-였어요’ is used.
So ‘가수’ becomes ‘가수였어요.’

어제가 제 생일이었어요.
‘생일’ and ‘-이었어요’ combined and formed ‘생일이었어요’.

유나 씨는 좋은 친구였어요.
‘친구’ and ‘-였어요 combined and formed ‘친구였어요’.

제 꿈은 배우였어요.
‘배우였어요’ is a combination of the noun ‘배우’ and ‘-였어요.

어제가 무슨 요일이었어요? What day was yesterday?
오늘이 월요일이니까 어제는 일요일이었어요. Because today is Monday, yesterday was Sunday.