Yes, it certainly matters. Baking is not about what goes in, it is about the structure in which it goes in (and as a consequence, the structure in which it comes out). If you start using oil instead of margarine, the results will be anything between "different" and " a disaster". Flour soaked in liquid oil behaves very differently than flour in contact with margarine, and until the time the margarine melts, a lot of other interactions should have happened, which will prevent the flour (or the other ingredients) to behave as if they had been in contact with liquid oil from the beginning.
Simply "different" is something you will get in some forgiving batters such as muffin batter (when made by the mix-everything-at-once method, also aptly named "muffin method") and some types of cookie, which will show difference in spread behavior and variables such as chewiness. Yeast doughs, which usually use the fat simply as a form of enrichment, will likely be the least affected, in fact many of them may direct you to melt a solid fat for easy mixing.
You can expect a very bad result in any short or flaky dough (pie crusts and many types of cookie), in recipes which rely on creaming the margarine (many cakes and cupcakes for the batter, and all sorts of buttercream), and laminated doughs. Probably also others, these are the ones that come first to my mind.