Both "aligned to" and "aligned with" are grammatically correct. However, "aligned with" is more commonly used when referring to things that are in agreement or in harmony, while "aligned to" is often used when referring to physical positioning or adjustment.