How did the two forms come about?
The original imperative did not end in -yo or -ro. In Old Japanese, it took the following form: upper monograde: -i1, upper bigrade: -i2.† To this, an emotive -yo may be added, but it was optional.
During the transition to Early Modern Japanese, the 上代特殊仮名遣い distinction 1/2 was lost. This resulted in confusion between the irrealis and imperative for mono/bigrade verbs, which both now ended in either -i or -e. The solution for this was to require the emotive suffix -yo to the end of the imperative, which then became mandatory for mono/bigrade verbs and as such is now inseparable.
The -ro suffix found in volumes 14 and 20 of the Man'yōshū, which are the chapters covering the eastern dialects. Usage is identical to western -yo. Like emotive -yo, an emotive particle -ro may also be found. (cf #3552)
What is the difference in usage of the imperatives? When will one form be used over the other? Or what determines the preference?
With the propagation of the Tōkyō dialect, -yo forms sound old and even formal. As such, you will typically find the -yo forms in written materials (test instructions etc) while the -ro forms in spoken discourse.
†Monograde (一段) is a verb conjugation type characterized by the irrealis (未然形) and adverbial (連用形) both ending in -i (上) or -e (下). The 1/2 (甲乙) notation indicates two different phonologically sounds. For example, there were two types of ki: /ki1/ and /ki2/. One phonetic reconstruction for this *ki and *kɨ. (The * indicates a reconstruction.) This difference cannot be be written in kana. Look up 上代特殊仮名遣 for further details.