You can enjoy the view
Tourists who are visiting a country for the first time may enjoy watching the city/country go by. My husband and I enjoy often choose to take the train while travelling for this reason. It's an easy, cheap, relaxing way to view the country you're visiting, especially the chance to gain a snapshot of locals going on with their lives in the countryside.
You can be productive
There is freedom of movement on a train and access to useful facilities: wifi, food, bathroom access, and cellphone reception. One may do some work, or read, or spend time with family. Trains are a much less stressful mode of travel for families with small kids, and this becomes a chance to play games and have family time while on holiday. I often used to play chess with my family while we travelled by train.
You pay less
Overnight trips are more expensive. It's cheaper to book a seat than a bunk. Seats use less space, so more can be fit onto a train.
Overnight is not always an option
Many routes only run during the day. It's more expensive for a company to pay people to work overnight. Locals will be using the trains during the day, but only long distance travellers will at night. If the train makes several stops along the way, then stopping at night becomes impractical.
Overnight is not always comfortable (Thanks @Zach Lipton)
Some people find it difficult to sleep in an unfamiliar bed or on a train bunk (or worse, in a seat!). It may not offer the quality of sleep one is used to. Especially if a person is easily awoken and disturbed by the movement of the train.
For some, it's not time wasted
To a person who is only concerned with the destination, overnight travel would seem more practical than daytime travel, but for many tourists or other people who choose to use the train, it's as much about enjoying the journey as it is about the destination.