You would use the article in conjunction with a weekday in one of two cases:
1) if you are talking about a series of days, e.g.:
Le dimanche je rend visite à ma mère. -- Sundays I visit my mother. (meaning all Sundays)
2) if you are talking about a weekday in general, e.g.:
Je déteste le lundi. -- I hate Mondays.
In your example you are referring to a particular Sunday, hence no article:
J'ai rendu visite à mon ami dimanche dernier.