Is it OK to leave this switch ungrounded?
There's a ground there, so use it

Since the box has a grounding wire in it (it's the bare wire crimp-connected to the other bare wires), you'll need to hook it up to the switch, as per NEC 404.9(B) (the exceptions are not shown here as they do not apply to your case):


  (B) Grounding. Snap switches, including dimmer and similar control switches, shall be connected to an equipment
  grounding conductor and shall provide a means to connect
  metal faceplates to the equipment grounding conductor,
  whether or not a metal faceplate is installed. Snap switches
  shall be considered to be part of an effective ground-fault
  current path if either of the following conditions is met:
  
  (1) The switch is mounted with metal screws to a metal
  box or metal cover that is connected to an equipment
  grounding conductor or to a nonmetallic box with integral means for connecting to an equipment grounding
  conductor. 
  
  (2) An equipment grounding conductor or equipment
  bonding jumper is connected to an equipment grounding termination of the snap switch.