Could there be a relationship between black lines on fingernails and lipitor (atorvastatin)? Since stopping the medicine they have disappeared

No. Restart the Lipitor (atorvastatin) and see if they come back. It's not a reported side effect, but we're all different!
Black nail lines. It seems extremely unlikely that the Lipitor (atorvastatin) had anything to do with the black lines on your fingernails. There are two reasons: 1) this is not a commonly reported side effect of lipitor; and 2) real abnormalities of the nails go away only as the nail grows out, which takes weeks to months. If the lines went away in a matter of days, then it is more likely some coloration due to contact w somethin.