I think one thing that helps Max and Kevin be friends is their simple proximity to each other. They are next door neighbors, so being together and doing stuff together is easily accomplished.
A second thing that helps them be such good friends is that they share the characteristic of being socials outcasts. Both boys are looked at as strange and weird based on their looks alone. Max is huge and angry looking, and Kevin is far too small for his age and has severe mobility issues.
Finally, the two boys are able to be great friends because they accept the other person as they are. Kevin doesn't care that Max is big and has a father in jail. Kevin doesn't see all of the negatives in Max that other people see, and that is how Max sees Kevin. Max doesn't define Kevin by the disease. All Max sees is an incredibly bright, energetic, and imaginative kid that accepts Max for who he is.