The OI 135.56 nm line and CI 135.58 nm line are weak lines that are covered by NASA's Interface Region Imaging Spectrograph (IRIS) mission which studies how the solar atmosphere is energized. The emission in the OI 135.56 nm line is dominated by a recombination cascade. This line provides powerful diagnostics of unresolved velocity fields in the chromosphere. In this work, we study the formation of the OI and CI lines in a 1D RADYN simulation of a flare. We use the radiative transfer code RH to get a non-LTE solution with hydrogen, carbon, and oxygen solved simultaneously. We find that the OI line is optically thin and the CI line is optically thick. Normally, the oxygen line is stronger than the carbon line but in flares, the ratio is opposite. Our results show that the intensity of the OI line peaks before the intensity of the CI line. We find that as the electron density increases in the flare, the collisional rates between other levels increase, causing a less increase in the radiative rates corresponding to the OI line. For carbon, as the electron density increases, there is more coupling between the source function and the Planck function, and the intensity of the CI line peaks.