It's clear that Marty first met the 1955 version of Doc by tracking his house down in the phone directory. However, earlier in the film, they are shown to have quite a strong relationship. Doc is happy with Marty coming into his house and even invites him to let himself in.
Doc: This is very important. I forgot my video camera. Can you stop by and pick it up on your way to the Mall?
The fact that they spend time together seems to be common knowledge, to the extent that even the principal of Marty's school says that Marty is "still hanging around" with Doc.
Strickland: Am I to understand that you are still hanging around with Doctor Emmett Brown, McFly?
But how did they get to know each other initially? Their hardly of a similar age and Marty doesn't seem to have any real interest in science or Doc's inventions. Why would he be involved with Doc in the first place?