The loop in the black wire is normal when electricians are running a hot wire from device to device. It saves them time and is really safer since it involves fewer wire nuts.
The orange wire is the wire that is going to the light. The power enters the switch where the black wire is looped over the screw, and exits to the light through the orange wire.
Yes, attach the green wire to the green screw. But, you need to wire the blacks from the switch differently. One switch black is for the incoming power, and the other is for the exiting power. So, one needs to be connected to the same black that is connected to the old switch; and one needs to be connected to the orange.
I would, with the power off at the circuit breaker panel, and after testing to make sure the black at the switch is not hot, cut the existing black to form two separate wires and strip the ends appropriately. Then I would connect one of the black wires from the new switch to these two wires with a wire nut. After that, connect the other black for the new switch to the orange with a wire nut. That should do it, and your dimmer should now work. Good luck, and be careful!
PS: I personally use a Fluke 1AC-A1-II Volt-Alert AC Non-Contact Voltage Tester to verify or locate hot wires and love it. You might want to check it out for the future. Its inexpensive too. Note: I have no personal connection to Fluke; I just think good products like this are worth spreading the word about.
Best Answer
The quick answer is yes, it is ok however I'd advise to switch the wires. That is, wire nut the two white wires and connect the black wires through the dimmer switch, I'll explain.
You switch box is a hot box, any switch system has a hot box or hot lamp. If power is run directly to the lamp and only switch cables run to the switch you have a hot lamp. In this case you have a hot box, one set of those cable is live and the other set runs to the lamp outlet. On a hot box you want to bridge the neutral lines together(white) and switch the hot lines(black) that way your lamp isn't powered when change a light bulb (and the switch is turned off). Side note to complete: a hot lamp typically runs a black and white to the switch so you'd have one color on each side of the switch.