This chapter focuses on the recent progress in 2D ovalent organic frameworks (COFs) as optoelectronic materials, with an emphasis on their semiconducting, energy conversion, and energy storage properties. 2D covalent polymers, such as COFs, in which building blocks are precisely integrated into extended structures with periodic skeletons and ordered pores, have some distinctive advantages. In general, COFs with extended p-conjugated systems, designed by using more electron-rich building blocks, display p-type semiconducting behavior. O. M. Yaghi and coworkers reported two unique COFs under solvothermal condensation of porphyrin derivative, either through boronate ester formation with tetrahydroxy anthracene or through imine bond formation with tetraphthaladehyde. D. Jiang et al. further developed a strategy to spatially confine electron acceptor COFs with the open channels of electron-donating frameworks by exploring covalent click chemistry to achieve donor-acceptor COFs with an ambipolar conducting nature. In systems photoinduced electron transfer and charge separation, along with carrier concentration efficiency, largely depend on the acceptor content in the open pore.