They can be anywhere but underneath. By putting it on the side, you will get bigger growth in the middle and lower section than normal, but the tops won't be as big.
Ideally a whole load of lights would be good, illuminating the plant(s) from all directions. But most of us can only accommodate one HID, which we try to put overhead.