Neither is right or wrong. .m
is slightly more compatible as it works in older versions and there are a few rare situations where it seems to be required (e.g. PacletInfo.m
). You are very unlikely to come across these situations.
While .wl
is newer, using .m
will have no disadvantages at this point.
You will notice that all files in Mathematica's installation directory still use .m
as of 11.1.
If you look at packages published by people at Wolfram, you will find that some use .m
and some use .wl
. Generally, it is a good idea to use these packages (such as GitLink) as a model.