The first detection of GWs from a binary neutron star merger (GW170817) marked the beginning of the multimessenger astronomy era. A few hours after the GW detection, the observation of an associated electromagnetic counterpart compatible with a kilonova/macronova emission remarkably confirmed our basic picture concerning the ejection of matter and the nucleosynthesis occurring in such a kind of events. At the same time, it gave a first demonstration of the power of a multimessenger analysis in exploiting binary compact mergers as laboratory of fundamental physics. In this contribution, we will present the status of kilonova/macronova modeling in terms
of the different ejection mechanisms, and of the associated r-process nucleosynthesis. We will show the impact of the variety of ejecta (both in terms of microphysical properties and spatial distributions) on the light curves, with a particular application to the case of GW170817. This modelling provides complementary information to the GW signal and is crucial to set multimessenger constraints, for example for the equation of state of nuclear matter.