Is it ok to have paragraphs that have only one sentence in a formal paper?
The Wikipedia article on paragraph says a para could contain one or more sentences. The very purpose of grouping content into paragraphs is to organise similar thoughts into one unit. Too many small or one-sentence paragraphs will affect the cohesiveness of your content.

But a one-sentence para may be fine at the end of a section in a paper if it adequately summarises the content within. (Like this, perhaps!)