In my case, I can think of 3 situations where I'd be wearing sunglasses indoors without having any wish to look cool ..
I wear prescription glasses. I need to wear them (or contacts) all the time. My current lenses are the 'transitions' ones which darken automatically. As they get older, they seem to get slower to react so it could often seem that I'm wearing sunglasses when it is simply that they haven't 'cleared' yet.
If I'm wearing contacts and it's sunny then I may wear sunglasses as well - and then, because I'm used to wearing glasses all the time I just forget I have them on even indoors.
I have prescription sunglasses. If I haven't also got my regular glasses with me (or if I'm only going to be indoors for a short period and it's not worth changing them) then I'll wear the sunglasses insider because otherwise I can't see.
And as PPs have said, there may be lots of medical reasons why someone would be doing this.
I think it is a little situational, though - because of the lack of eye contact it could feel rude if you are (say) speaking to someone one-on-one in a social setting, so in those sorts of situations if someone looked uncomfortable I'd mention that I've leaving them on bacuase I forgot my normal specs, or that the lenses would lighten up given time, or whatever.