Exactly how much dialogue is up to the author. My characters talk to each other a lot. Other writers possibly use less. But there must be some.
Dialogue serves several purposes.
It advances the plot. Character A tells Character B something, and at the same time informs the reader:
'My dear Mr Bennet, have you heard that Netherfield Hall is let at last?'
By the end of that scene, which is less than two pages long, a major part of the plot (the possibility that one of the Bennet girls will marry Bingley) has been set up and the reader has learned a fair amount about Bingley and the Bennets, entirely through the conversation between Mr and Mrs Bennet.
Another way dialogue can be used to inform the reader is in crime and mystery novels, when the detective and his or her sidekick recap the crime and review the suspects and their possible motives.
All this could be done in narrative, of course, but that would preclude one of the other prime functions of dialogue: to reveal character. By the end of the opening scene of Pride and Prejudice, the reader knows that Mrs Bennet is talkative, that she likes to gossip, and she is, or likes to think she is, subject to 'nerves'.
Later, in another important plot development, Elizabeth forms her first impressions of Mr Darcy from overhearing his conversation with Bingley:
'She is tolerable, but not handsome enough to tempt me; I am in no humour at present to give consequence to young ladies who are slighted by other men.'
Later, Elizabeth meets the housekeeper at Pemberley:
'He is the best landlord, and the best master,' said she, 'that ever lived; not like the wild young men nowadays, who think of nothing but themselves. There is not one of his tenants or servants but will give him a good name. Some people call him proud; but I am sure I never saw anything of it. To my fancy, it is only because he does not rattle away like other young men.'
Again, this moves the plot along, as it causes Elizabeth to revise her opinion of Darcy.
Dialogue also helps to generate tension:
'Come, Watson, come!' he cried. 'The game is afoot. Not a word! Into your clothes and come!'
is much more dramatic than 'Holmes told me to get dressed quickly and come with him'.
The denouement of a crime novel, when the detective gathers all the suspects in the library in order to reveal the criminal, is another occasion when dialogue is used to create tension.
Dialogue also helps to maintain pace. The opening scene between Mr and Mrs Bennet moves along quickly because it's all dialogue; there is narration only before and after it.
In romance, dialogue can also be used to show that the two people involved are getting to know one another, and that they are well suited. (It is a pet peeve of mine that romance novels too often end with the couple presumed to be heading for a happy ever after when they have barely had a conversation throughout the book!)
And dialogue also serves to entice readers. A prospective reader is not confronted with a wall of text when dipping into a book. He or she can quickly establish, by reading a passage of dialogue, who the characters are and whether he or she wants to read about them.
That is what dialogue is for. How to write it is a subject for another post!