The rule is very simple indeed.
If 'uncle' is part of a name, used like a title, or used instead of a name, it needs to have a capital letter. Otherwise, it has a lower case 'u'.
I always write a letter to my uncle on Sundays.
I always write a letter to Uncle Brown on Sundays.
'Good night, Uncle.'
Mary said goodnight to her uncle before she went to bed.
The same goes for all family members:
I went shopping with Mum and Dad.
I went shopping with my mum and dad.