This is the 179th most frequent Polish word.
wtedy
"Then" (at that time).
Here, 'wtedy' refers to a specific time in the past.
W roku 2000 nie było jeszcze internetu w wielu domach, wtedy czasy były inne.
In the year 2000, there was no internet in many homes yet; back then, times were different.
Wtedy is used here to introduce an event occurring immediately after the previous one in a sequence of events.
Byłem w szkole, a wtedy zaczęło padać.
I was at school, and then it started to rain.
In this sentence, 'wtedy' is used to indicate the outcome in a conditional structure.