Recognition of single-stranded DNA (ssDNA) or single-stranded RNA (ssRNA) is important for many fundamental cellular functions. A variety of single-stranded DNA-binding proteins (ssDBPs) and single-stranded RNA-binding proteins (ssRBPs) have evolved that bind ssDNA and ssRNA, respectively, with varying degree of affinities and specificities to form complexes. Structural studies of these complexes provide key insights into their recognition mechanism. However, computational modeling of the specific recognition process and to predict the structure of the complex is challenging, primarily due to the heterogeneity of their binding energy landscape and the greater flexibility of ssDNA or ssRNA compared with double-stranded nucleic acids. Consequently, considerably fewer computational studies have explored interactions between proteins and single-stranded nucleic acids compared with protein interactions with double-stranded nucleic acids. Here, we report a newly developed energy-based coarse-grained model to predict the structure of ssDNA-ssDBP and ssRNA-ssRBP complexes and to assess their sequence-specific interactions and stabilities. We tuned two factors that can modulate specific recognition: base-aromatic stacking strength and the flexibility of the single-stranded nucleic acid. The model was successfully applied to predict the binding conformations of 12 distinct ssDBP and ssRBP structures with their cognate ssDNA and ssRNA partners having various sequences. Estimated binding energies agreed well with the corresponding experimental binding affinities. Bound conformations from the simulation showed a funnel-shaped binding energy distribution where the native-like conformations corresponded to the energy minima. The various ssDNA-protein and ssRNA-protein complexes differed in the balance of electrostatic and aromatic energies. The lower affinity of the ssRNA-ssRBP complexes compared with the ssDNA-ssDBP complexes stems from lower flexibility of ssRNA compared to ssDNA, which results in higher rate constants for the dissociation of the complex (k(off)) for complexes involving the former. Author summary Quantifying bimolecular self-assembly is pivotal to understanding cellular function. In recent years, a large progress has been made in understanding the structure and biophysics of protein-protein interactions. Particularly, various computational tools are available for predicting these structures and to estimate their stability and the driving forces of their formation. The understating of the interactions between proteins and nucleic acids, however, is still limited, presumably due to the involvement of non-specific interactions as well as the high conformational plasticity that may demand an induced-fit mechanism. In particular, the interactions between proteins and single-stranded nucleic acids (i.e., single-stranded DNA and RNA) is very challenging due to their high flexibility. Furthermore, the interface between proteins and single-stranded nucleic acids is often chemically more heterogeneous than the interface between proteins and double-stranded DNA. In this study, we developed a coarse-grained computational model to predict the structure of complexes between proteins and single-stranded nucleic acids. The model was applied to estimate binding affinities and the estimated binding energies agreed well with the corresponding experimental binding affinities. The kinetics of association as well as the specificity of the complexes between proteins and ssDNA are different than those with ssRNA, mostly due to differences in their conformational flexibility.