Welcome, Ray.
Which version of X1 do you have (LE, Essentials, Studio,Producer)?
The MIDI I/O lights will normally be off, but should flash when you hit or release a key.
That's the first link in the chain.
If the MIDI In light does not flash, verify that the MIDI Out of the Yamaha is connected to the MIDI In of the UM-1.
Also verify that the Yamaha is actually transmitting. You may need to turn local off. I'm not familiar with this keyboard, so check your manual.
In X1 Preferences>MIDI Devices, make sure the UM-1 I/O ports are selected. If not, Sonar will know they are there, but will not communicate with them. If Sonar is receiving data from the UM-1, the MIDI icon in your task bar will flash.
This is the second link.
If you do not see this, you cannot record the MIDI output from the Yamaha.
If you do, we can move on to the next step.
Have you inserted a MIDI track? If so, the Input should be set to the UM-1(or Omni, but this doesn't always work).
Arm the MIDI track by clicking the record button in the track, then click record in the transport.
If that doesn't work, let us know where you are experiencing a disconnect.