1. formal and polite style (-습니다/ㅂ니다)
When you make speech in front of people (often in a public place)
ex) 만나서 반갑습니다.
2. formal and impolite style (-다)
When you write an article which any people will read, or when you write diary
ex) 한국어는 한국의 언어이다.
3. informal and polite style (-(어/아)요)
1. When you talk to someone in person such as your teacher, neighbers, or any adults.
3. When you talk to someone in person such as an internet user who you don't know in person.
ex) 만나서 반가워요.
4. informal and impolite sytle (no specific ending attached)
1. When you talk to your close friends or family who are not older than you
2. When you talk to children
ex) 만나서 반가워.