Yes, actually it does make a difference as to which muscles are activated. In both positions, the chest muscles are the primary movers. However, with the elbows tucked into the sides, the triceps muscle behind the upper arm becomes more active. When the elbows are out, the deltoid muscle of the upper arm is more active.
You can actually test this for yourself by doing many repetitions of just one kind (elbows in versus elbows out). You’ll likely be sore within 24 to 48 hours. Repeat the exercise using the other method. Compare which muscles are more active by patterns of soreness.
Most people would prefer to avoid muscle soreness. There are ways to measure muscle activity. Studies of adults doing push ups against a force plate have measured muscle activity with this exercise. Besides the main muscle doing the action, other “helper” muscles are found this way.