ことにする, ことになる, ようにする and ようになる: decisions, rules and habit shifts
Distinguish a personal decision, an agreed outcome, an ongoing effort and a change in ability or habit using four B1 Japanese constructions.

In short
ことにする presents a decision, and ことになる presents something as decided or resulting from circumstances. ようにする describes deliberate effort towards a pattern, whereas ようになる reports that the pattern or ability has changed.
| Form | Focus | Example |
|---|---|---|
| ことにする | A choice | 来月から自転車で通うことにしました。 |
| ことになる | An arrangement or outcome | 会議は金曜日に行うことになりました。 |
| ようにする | Intentional effort | 毎日歩くようにしています。 |
| ようになる | Change in state | 日本語で予約できるようになりました。 |
The sentence about the bicycle says that I have decided to commute by bicycle starting next month. The meeting example presents Friday as the agreed date rather than highlighting an individual decision-maker. The daily walking example describes an effort to keep up a habit. The reservation example describes gaining the ability to book in Japanese. All four can concern the future or past depending on their endings; the choice is about how the event is framed.
One situation, four different messages
夜はスマートフォンを使わないことにしました。
丁寧語 politeI decided not to use my phone at night.
A specific decision; negative plain form precedes こと.
図書館では電話を使わないことになっています。
丁寧語 politeThe library has a rule against using phones.
The ている ending presents an established arrangement.
寝る前は画面を見ないようにしています。
丁寧語 politeI make a point of not looking at a screen before bed.
Ongoing personal effort; this does not assert perfect success.
最近、夜中に目が覚めないようになりました。
丁寧語 politeRecently I have stopped waking up in the middle of the night.
A changed state, not necessarily deliberately achieved.
You can say ことになりました about a plan you helped decide; it does not guarantee that you had no say. Conversely, ようにする can describe a particular measure taken to ensure a result, not just a longstanding habit. In an instruction, the future pattern is especially common: 忘れないようにしてください。 means “Please make sure you do not forget.”