Many Dragon Ball fans have long wondered how a girl like Android 18 ended up with a straitlaced guy like Krillin. As it turns out, Akira Toriyama did have an answer for this, and that's actually a key part of it.
Over the course of the Android and Cell sagas, Krillin comes to sympathize with Android 18, particularly when Cell reveals his intention to absorb her. Krillin's sympathies for 18 do seem to be largely down to her appearance, at least initially, but he's willing to go much farther in defense of her than she could even understand. Krillin refused to shut down 18 to prevent Cell from absorbing her, thinking there must be another way, giving the villain the opportunity he needed. Cell eventually ejected 18 after a punch from Gohan, and Krillin was the first at her side.
How Android 18 Fell in Love With Krillin
18 Recognized Krillin as an Honest, Dependable Guy
After Cell's defeat, Krillin wishes for the bombs inside 17 and 18 to be deactivated by Shenron, allowing them to live normal lives. This act seems to have moved 18 enough to at least give Krillin a chance. After the timeskip into the Buu saga, 18 and Krillin are officially a couple, and already have their daughter, Marron. 18 had a wild personality during her time wreaking havoc as an Android alongside her brother, so what changed for her?
According to an interview translated by Kanzenshuu, Toriyama explained 18's interest in Krillin thusly: "Sorry, I’m really bad when it comes to romantic stories like this, so I can’t give you a straight answer. But I think that probably No. 18 (who used to be a delinquent) found Krillin's seriousness and straightforwardness refreshing, and somehow or other she ended up falling for him." While that isn't terribly illuminating, it does explain what 18 sees in Krillin that makes her willing to give him a chance.

Akira Toriyama Had A Hilarious Explanation For One Classic Dragon Ball Villain's Powers
Dragon Ball has always been an amazing comedy manga, and the origins of one iconic villain prove this fact.
18's "delinquent" behavior seems to have stemmed from her time as a human, and simply continued after her transformation into an Android at the hands of Dr. Gero. Krillin really is a no-nonsense kind of guy, at least by the time of Dragon Ball Z, and he very much wears his heart on his sleeve. It's not too hard to imagine, in an "opposites attract" kind of way, that Android 18 might actually find this side of Krillin to be very interesting, and having already seen the incredible level of devotion that he has towards her, found herself feeling the same way.
Android 18 and Krillin's Relationship is Far From the Only Mystery
Toriyama Often Had Relationships Progress Offscreen
Of course, almost all the major couples in Dragon Ball have a timeskip to thank for their relationship. Goku ends up marrying Chi Chi during the gap between Dragon Ball and Dragon Ball Z, while Bulma and Vegeta first hook up during the timeskip between Future Trunks' warning of the Androids and when they actually show up. The only relationship that really gets covered fully on screen is Gohan and Videl's, during the Saiyaman arc. It's clear from all this that Toriyama really means it when he says he's "really bad" at romantic stories, and works to avoid romance whenever possible.
In the end, the courtship of Krillin and Android 18 was relegated to offscreen because Toriyama wasn't that confident in his ability to show it realistically, but he did have an idea as to how it would progress, even if he didn't show it. Krillin's love for 18 and devotion to her is obvious, but 18 seems to have warmed up to Krillin a little more slowly, and found him to be so unlike herself as to be interesting. Android 18 and Krillin may be one of Dragon Ball's most unlikely couples, but they're a couple with a solid foundation, even if it occurred offscreen.