adverb
immediately; instantly; right away
Describes doing something without delay, often in response to a situation. Similar to すぐに but more literary.
彼はやにわに立ち上がって部屋を出て行った。
He immediately stood up and left the room.
adverb
suddenly; abruptly; all of a sudden
Emphasizes the unexpectedness of an action, often with a sense of surprise. More dramatic than 突然.
やにわに雨が降り出した。
Suddenly, it started raining.
The exact derivation is uncertain; the kanji 矢庭 (arrow garden) may be ateji, and the word likely originated from an older adverbial phrase.