To meet strict requirements of the information society technologies, antennas and circuit elements are becoming increasingly complex. Frequently, their electromagnetic (EM) properties cannot be anymore expressed in closed-form analytical expressions mainly because of the multitude of irregular geometries found in actual devices. Therefore, accurate and efficient (in terms of computational time and memory) electromagnetic models coupled with the robust optimization techniques, are needed in order to be able to predict and optimize the behavior of the innovative antennas in complex environments. The contribution of this thesis consists in the development and improvement of accurate electromagnetic modeling and optimization algorithms for an ubiquitous class of antennas, the planar printed antennas. The approach most commonly used to model and analyze this type of structures is the Integral Equation (IE) technique numerically solved using the Method of Moments (MoM). From the computational point of view, the main challenge is to develop techniques for efficient numerical evaluation of spatial-domain Green's functions, which are commonly expressed in terms of the well-known Sommerfeld integrals (SIs), i.e., semi-infinite range integrals with Bessel function kernels. Generally, the analytical solution of the SIs is not available, and their numerical evaluation is notoriously difficult and time-consuming because the integrands are both oscillatory and slowly decaying, and might possess singularities on and/or near the integration path. Due to the key role that SIs play in many EM problems, the development of fast and accurate techniques for their evaluation is of paramount relevance. This problem is studied in detail and several efficient methods are developed. Finally, the applicability of one of these methods, namely the Weighted Averages (WA) technique, is extended to the challenging case appearing in many practical EM problems: the evaluation of semi-infinite integrals involving products of Bessel functions. However, the development of effective analysis codes is only one aspect. At least equally important is the availability of reliable optimization techniques for an adequate design of antennas. For that purpose, the Particle Swarm Optimization (PSO) algorithm is introduced in the context of our analysis codes. Moreover, the innovative hybrid version of the PSO algorithm, called the Tournament Selection PSO, has been proposed with the aim of even further improving convergence performances of the classical PSO algorithm. Detailed theoretical description of this socially inspired evolutionary algorithm is given in the thesis. Finally, the characteristics of both algorithms are compared throughout several EM optimization problems.