Some stand up on their own. They don't need the preceding dialogue to be clever, or funny, or both. History has recorded a myriad of brilliant replies, retorts and responses to all sorts of situations and occasions.
For the comedic, Rodney Dangerfield and Bob Hope stand out as having said some particularly humoress lines, while Winston Churchill was not adverse to a barbed remark with a helping of wit and humor. Of course he was also noted for his more serious quotations during World War Two. Mae West, Groucho Marx and W.C. Fields uttered some of the most famous lines in movie history, while John F. Kennedy is noted for some of the more serious in modern history.