Both of these characters are used by Austen to parody the upper classes and their pretension, hypocrisy and arrogance. From the very first paragraph of the novel, Sir Walter Elliot is shown to be a man obsessed with his position in society. Note how the only book he is ever shown to pick up and read is the Baronetage, which he only reads to remind himself of his own status in society and his rank. Note how the first paragraph describes him:
Sir Walter Elliot, of Kellynch Hall, in Somersetshire, was a man who, for his own amusement, never took up any book but the Baronetage; there he found occupation for an idle hour, and consolation in a distressed one; there his faculties were roused into admiration and respect, by contemplating the limited remnant of the earliest patents; there any unwelcome sensations, arising from domestic affairs, changed naturally into pity and contempt, as he turned over the almost endless creations of the last century--and there, if every other leaf were powerless, he could read his own history with an interest which never failed...
The fact that he is able to read and re-read this book "with an interest which never failed" smacks of some kind of egocentric attitude that points towards his own obsession with his power, rank and station above all else. This is supported by the rest of the novel, where he is presented as being profoundly unsympathetic and snobbish about those around him, even going as far as to mock the Admiral and his wife for their "low class" when ironically they are able to let his ancestral home and support his profligate ways.
In the same way, Lady Catherine de Bourgh shows herself to be an arrogant snob who is only concerned about name and station. Note what she says to Elizabeth when she goes to her house to try and dissaude her from marrying Darcy:
And is such a girl to be my nephew's sister? Is her husband, is the son of his late father's steward, to be his brother? Heaven and earth!--of what are you thinking? Are the shades of Pemberley to be thus polluted?
Lady Catherine de Bourgh hear refers to Lydia and Whickam's elopement. For her, it would represent social suicide for Lizzie to marry Darcy, as her name and the exploits of her sister would "taint" and drag down Darcy's reputation and social status. Both Sir Walter Elliot and Lady Catherine de Bourgh are therefore used by Austen to parody and make fun of the upper classes and their pretensions and feelings about class and rank. Both are portrayed in a very unsympathetic light, and the main protagonists of both novels are shown to have to stand up to them in one way or another to achieve happiness.