Alloyed nanoparticles of palladium (Pd) and gold (Au) are promising candidates for hydrogen sensing in e.g., cars powered by fuel cells. Specifically, the plasmonic response of Pd-Au nanoparticles changes upon absorption of hydrogen, enabling quantitative measurement of the hydrogen partial pressure. The optical properties of alloyed nanoparticles are not only dependent on the concentration of the respective element, but also on the atomic ordering. This thesis presents atomistic simulations as well as first-principles calculations on Pd-Au nanoparticles, where the former aim at elucidating the thermodynamics, and the latter were conducted to investigate the optical properties of representative particles. A novel algorithm for determination of optical nanoparticle shapes, based on Monte Carlo simulations, is also presented. The atomistic simulations show that Au tends to segregate to the surface of the nanoparticle, especially at corner and edge sites, while the subsurface layer exhibits a Pd excess. The first-principles calculations, specifically density functional theory (DFT) and time-dependent density functional theory (TDDFT), show that the electronic oscillations occur almost exclusively on the surface of the particles, while the interior atoms play an important role in screening of the optical response. The calculations do not, however, reveal any distinct plasmonic peak in the optical absorption spectra.