V + 기로 하다 is used to show that you have made a plan or promise to yourself or someone else. It is more concrete than 려고 했다:
오후에 도서관에 한국어를 공부하기로 했어요.
I decided to study Korean at the library this afternoon.
이번 주말에 덜 술을 마시기로 했어요.
I decided to drink less alcohol this weekend.
원래 여름 방학 동안, 호주 친구를 방문하기로 했는데 돈이 없어요.
I originally planned to visit my Australian friend during the summer vacation, but I don't have enough money.
내일부터 신선한 음식을 더 먹기로 했어요.
I decided to eat more fresh vegetables from tomorrow.
바람이 많이 불어서 해변에 가지 않기로 했어요.
It was very windy so I decided not to go to the beach.