Depending on the gun A thin layer of oil is beneficial for older firearms with bluing or parkerized finishes. Although more recent coatings are rust-resistant, it doesn't hurt.
Generally speaking, a quick cleaning procedure of gun lubricant can help you maintain the condition of your rifle by preventing carbon particles from accumulating along the barrel after 250–300 rounds. On the other hand, you should think about a more thorough cleaning when you reach the 3000-round threshold.