The aim of this work is to understand the details of the interactions of ionic liquids with carbon nanomaterials (graphene and nanotubes) using polyaromatic compounds as model solutes. We have combined the measurements of thermodynamic quantities of solvation with molecular dynamics simulations to provide a microscopic view. The solubility of five polycyclic aromatic hydrocarbons (naphthalene, anthracene, phenanthrene, pyrene and coronene) was determined in seven ionic liquids ([C4C1im][C(CN)3], [C4C1pyrr][Ntf2], [C10C1im][Ntf2], [C2C1im][C(CN)3], [C2C1im][Ntf2], [C3C1pyrr][N(CN)2] and [C4C1im][N(CN)2]) at 298 K. The enthalpies of the dissolution of naphthalene, anthracene and pyrene were measured in four of the ionic liquids. Free energies were estimated from those measurements in order to analyse the entropic or enthalpic contributions to the dissolution process. Molecular dynamics simulations provided solvation free energies that were compared to experimental and structural information. Spatial distributions of solvent ions around the solutes when combined with IR measurements elucidate the structure of solvation environments. Interactions between the imidazolium rings of cations and the π system of the solutes have been identified. However, ionic liquids with pyrrolidinium cations appeared as better solvents due to favourable enthalpic contributions compared to imidazolium cations. Long alkyl side chains on cations lead to higher solubility and lower enthalpy of dissolution by creating a "softer" solvation environment. Considering the effect of anions, small and planar anions lead to higher solubilities and lower enthalpies of dissolution of polyaromatic hydrocarbons. These findings provide the design principles based on molecular interactions and the structure of solvation environments to choose or formulate ionic liquids in view of their affinity for carbon nanomaterials.