JKR spoke to this issue in a recent interview. Hermione was drawn to Ron because he's funny, the perfect counterpoint to her intensity.
"Just like her creator, she has a real weakness for a funny man. These
uptight girls, they do like them funny … It's such a relief from being
so intense yourself – you need someone who takes life, or appears to
take life, a little more lightheartedly."
In the novels, her attraction to him seems to have been fanned by their enforced proximity over the past few weeks, the fact that they're being chased by the Death-Eaters and the fact that Ron actually uses his brain for a change
‘But how did you get in there?’ he asked, staring from the fangs to Ron. ‘You need to speak Parseltongue!’
‘He did!’ whispered Hermione. ‘Show him, Ron!’
Ron made a horrible, strangled hissing noise.
‘It’s what you did to open the locket,’ he told Harry apologetically. ‘I had to have a few goes to get it right, but,’ he shrugged modestly, ‘we got there in the end.’
‘He was amazing!’ said Hermione. ‘Amazing!’