Microwave modeling and optimization play important roles in electromagnetic (EM)-based microwave component design. This thesis first proposes a new deep neural network technique to solve high-dimensional microwave modeling. A smooth rectified linear unit (ReLU) is proposed for the new deep neural network. The proposed deep neural network employs both sigmoid functions and smooth ReLUs as activation functions. An advanced three-stage deep learning algorithm is proposed to train the new deep neural network. This algorithm can determine the number of hidden layers with sigmoid functions and those with smooth ReLUs in the training process. It can also overcome the vanishing gradient problem for training the deep neural network. The proposed deep neural network technique can solve microwave modeling problems in higher dimension than previous shallow neural networks. This thesis further proposes an advanced cognition-driven EM optimization incorporating transfer function-based feature surrogate for EM geometry optimization of microwave filters. The proposed technique addresses situations where the response at the starting point is substantially misaligned with design specifications. We propose to extract transfer function-based feature parameters to address the challenge that features cannot be clearly identified from the filter response. Multiple transfer function-based feature parameters are extracted and used to develop the feature surrogate for the proposed cognition-driven optimization. Furthermore, we derive new objective functions directly in the feature space. The proposed cognition-driven optimization method can achieve faster convergence than existing feature-assisted EM optimization methods. Moreover, this thesis further proposes an efficient EM topology optimization technique for microwave component design. The proposed technique utilizes the finite element method (FEM) for EM simulation. We propose a new method to integrate Matrix Pade via Lanczos and Householder formula so that the effort of solving large FEM matrix equations at many frequencies is reduced to the effort of solving only a small matrix problem at a single frequency point, thereby speeding up the topology optimization process. We further propose a new method to reduce the small matrix problem into an even smaller one by exploiting the inheritance pattern of genetic algorithm. Using the proposed technique, the EM topology optimization process can be greatly accelerated.