You have to make sure that the columns you're trying to extract data from are not themselves null. Keep in mind this was typed off the top of my head, so you may need to tweak it.
Dim totalTime As String = ""
For i = 0 To Carer.dt.Rows.Count - 1
Dim timeFrom as String = ""
Dim timeTo as String = ""
if (Not IsDBNull(Carer.dt.Rows(i)("TimeFrom")) Then
timeFrom = Carer.dt.Rows(i)("TimeFrom").ToString()
End If
if (Not IsDBNull(Carer.dt.Rows(i)("TimeTo")) Then
timeTo = Carer.dt.Rows(i)("TimeTo").ToString()
End If
If (Not string.IsNullOrEmpty(totalTime)) Then
totalTime += ","
EndIf
totaltime += string.Format("{0}-{1}", timeFrom, timeTo)
Next
Finally, using the debugger would have help you solve the issue.