If wave energy systems are to become a viable option competitive with more mature renewable energy sources, the systems must be optimized with respect to maximal electricity production and minimized costs. The number of parameters involved in large-scale wave energy systems is typically too large for traditional optimization methods to be feasible, and the solution space may contain many local minima. Here, an optimization tool for application in wave energy design based on a genetic algorithm is presented. The internal parameters of single point-absorbing wave energy converters (buoy radius, draft and generator damping) are optimized and the results validated against parameters sweep optimization. Further, since the individual devices in a park affect each other by scattered and radiated waves propagating in all directions, the tool is used to find the optimal spatial layout of parks. Arrays with different number of devices are studied and similar optimal layouts appear in all cases, which allows extrapolation of the results to even larger parks. The results show that the tool is effective in finding layouts that avoid destructive interactions and get a q-factor slightly above 1.