As of December 1st  2012, there are four daily train between Kunming and Lijiang:

Kunming to Lijiang:

K9618 10:00-18:48

K9606 20:53-06:33

K9610 21:58-07:10

K9614 22:28-07:39

Lijiang to Kunming:

K9612 08:38-17:24

K9620 20:15-05:21

K9616 20:56-06:05

K9608 21:43-06:50

The train provides 4 soft sleeping beds in a private cabin, 6 hard sleeping beds in open area and normal seats.  Chinese readers can check website for latest time table. They can buy tickets online and collect ticket at station ticketing counter.  At Lijiang station, there are 3 buses going to city center.

http://www.12306.cn/mormhweb/  For English readers, you can get an idea of the facilities on the trains by looking at http://www.seat61.com/China.htm  Remember to take along your own snacks,  tea or instant coffee, etc. for refreshments along the way.