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 EMJ, 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.