As you may know there are verbs that can be formed by two character. Let's indicate it with V1V2
V1不V2 means I can't/I am not able to...
没V1V2 means I didn't...
So 睡不着 I am not able to sleep, while 没睡着 is I didn't sleep.
You may now wonder, why there is a difference? Is it more of a convention that one pattern is translated this way rather than the other way?
No, if we try to translate the meaning literally, we obtain:
I (try to) sleep but I don't fall
Or similarly for 看不到
I look but my gaze doesn't reach
For the other pattern instead, we have a straight negation,
So there is only way to translate it:
I didn't fall asleep or I didn't manage to look.
This should help you understand a first difference between these two patters but as you can see with 看到 the difference is even more subtle.
Remember now the difference between 不 and 没。不 is a negation for the present while 没 is a negation for the past.